-
Bug
-
Resolution: Duplicate
-
P4
-
7
-
None
-
generic
-
generic
src/share/classes/java/security/cert/X509CertSelector.java:2217: warning: unreachable catch clause
2177 try {
2178 ext = (PrivateKeyUsageExtension)
2179 getExtensionObject(xcert, PRIVATE_KEY_USAGE_ID);
2180 if (ext != null) {
2181 ext.valid(privateKeyValid);
2182 }
2183 } catch (CertificateExpiredException e1) {
...
2217 } catch (CertificateException e3) {
2218 if (debug != null) {
2219 debug.println("X509CertSelector.match: CertificateException "
2220 + "in private key usage check; X509CertSelector: "
2221 + this.toString());
2222 e3.printStackTrace();
2223 }
2224 return false;
2225 } catch (IOException e4) {
...
src/share/classes/sun/security/rsa/RSASignature.java:205: warning: unreachable catch clause
194 try {
195 byte[] decrypted = RSACore.rsa(sigBytes, publicKey);
196 byte[] unpadded = padding.unpad(decrypted);
197 byte[] decodedDigest = decodeSignature(digestOID, unpadded);
198 return Arrays.equals(digest, decodedDigest);
199 } catch (javax.crypto.BadPaddingException e) {
200 // occurs if the app has used the wrong RSA public key
201 // or if sigBytes is invalid
202 // return false rather than propagating the exception for
203 // compatibility/ease of use
204 return false;
205 } catch (GeneralSecurityException e) {
206 throw new SignatureException("Signature verification failed", e);
207 } catch (IOException e) {
208 throw new SignatureException("Signature encoding error", e);
209 }
2177 try {
2178 ext = (PrivateKeyUsageExtension)
2179 getExtensionObject(xcert, PRIVATE_KEY_USAGE_ID);
2180 if (ext != null) {
2181 ext.valid(privateKeyValid);
2182 }
2183 } catch (CertificateExpiredException e1) {
...
2217 } catch (CertificateException e3) {
2218 if (debug != null) {
2219 debug.println("X509CertSelector.match: CertificateException "
2220 + "in private key usage check; X509CertSelector: "
2221 + this.toString());
2222 e3.printStackTrace();
2223 }
2224 return false;
2225 } catch (IOException e4) {
...
src/share/classes/sun/security/rsa/RSASignature.java:205: warning: unreachable catch clause
194 try {
195 byte[] decrypted = RSACore.rsa(sigBytes, publicKey);
196 byte[] unpadded = padding.unpad(decrypted);
197 byte[] decodedDigest = decodeSignature(digestOID, unpadded);
198 return Arrays.equals(digest, decodedDigest);
199 } catch (javax.crypto.BadPaddingException e) {
200 // occurs if the app has used the wrong RSA public key
201 // or if sigBytes is invalid
202 // return false rather than propagating the exception for
203 // compatibility/ease of use
204 return false;
205 } catch (GeneralSecurityException e) {
206 throw new SignatureException("Signature verification failed", e);
207 } catch (IOException e) {
208 throw new SignatureException("Signature encoding error", e);
209 }
- duplicates
-
JDK-7064075 Security libraries don't build with javac -Xlint:all,-deprecation -Werror
- Resolved