Skip to content

[Backport 2.x] Use boucycastle PEM reader instead of reg expression (#2864) #2877

Merged
cwperks merged 1 commit intoopensearch-project:2.xfrom
willyborankin:backport-2864-to-2.x
Jun 20, 2023
Merged

[Backport 2.x] Use boucycastle PEM reader instead of reg expression (#2864) #2877
cwperks merged 1 commit intoopensearch-project:2.xfrom
willyborankin:backport-2864-to-2.x

Conversation

@willyborankin
Copy link
Collaborator

Backpor 3c9f7c2 from #2864

@codecov
Copy link

codecov bot commented Jun 20, 2023

Codecov Report

Merging #2877 (7f00a73) into 2.x (0d6ac30) will decrease coverage by 0.10%.
The diff coverage is 54.54%.

@@             Coverage Diff              @@
##                2.x    #2877      +/-   ##
============================================
- Coverage     61.53%   61.43%   -0.10%     
+ Complexity     3386     3377       -9     
============================================
  Files           264      264              
  Lines         18665    18645      -20     
  Branches       3288     3287       -1     
============================================
- Hits          11485    11455      -30     
- Misses         5597     5603       +6     
- Partials       1583     1587       +4     
Impacted Files Coverage Δ
.../org/opensearch/security/support/PemKeyReader.java 74.59% <54.54%> (-2.18%) ⬇️

... and 4 files with indirect coverage changes

@cwperks
Copy link
Member

cwperks commented Jun 20, 2023

@willyborankin Can you fix the unused import error?

Error: eckstyle] [ERROR] /home/runner/work/security/security/src/main/java/org/opensearch/security/support/PemKeyReader.java:30:8: Unused import - java.io.ByteArrayOutputStream. [UnusedImports]
Error: eckstyle] [ERROR] /home/runner/work/security/security/src/main/java/org/opensearch/security/support/PemKeyReader.java:36:8: Unused import - java.io.OutputStream. [UnusedImports]

Use BouncyCastle PEMReader instead of
regular expression to read and parse private key pem files.

Signed-off-by: Andrey Pleskach <ples@aiven.io>
@willyborankin willyborankin force-pushed the backport-2864-to-2.x branch from 580cfc9 to 7f00a73 Compare June 20, 2023 14:01
@willyborankin
Copy link
Collaborator Author

@willyborankin Can you fix the unused import error?

Error: eckstyle] [ERROR] /home/runner/work/security/security/src/main/java/org/opensearch/security/support/PemKeyReader.java:30:8: Unused import - java.io.ByteArrayOutputStream. [UnusedImports]
Error: eckstyle] [ERROR] /home/runner/work/security/security/src/main/java/org/opensearch/security/support/PemKeyReader.java:36:8: Unused import - java.io.OutputStream. [UnusedImports]

done

@cwperks cwperks merged commit 2426102 into opensearch-project:2.x Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants