ChristopherSchultz commented on a change in pull request #462: URL: https://github.com/apache/tomcat/pull/462#discussion_r775542058
########## File path: java/org/apache/tomcat/util/net/jsse/PEMFile.java ########## @@ -210,6 +214,14 @@ public PrivateKey toPrivateKey(String password, String keyAlgorithm, Format form throw exception; } + private String getPBEAlgorithm(EncryptedPrivateKeyInfo privateKeyInfo) { + AlgorithmParameters parameters = privateKeyInfo.getAlgParameters(); + if(parameters != null && OID_PKCS5_PBES2.equals(privateKeyInfo.getAlgName())) { + return parameters.toString(); Review comment: This seems fragile. The javadoc for `toString` doesn't say anything about the format of the resulting String. Will it always be acceptable to `Cipher.getInstance`? Is it acceptable in every case we can currently test? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org