Skip to content

Commit 2efe358

Browse files
committed
JSSE: throw SSLPeerUnverifiedException from getPeerCertificateChain() error path
1 parent 27bfc0b commit 2efe358

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/java/com/wolfssl/provider/jsse/WolfSSLImplementSSLSession.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,11 +654,12 @@ public Certificate[] getLocalCertificates() {
654654

655655
} catch (IllegalStateException | WolfSSLJNIException |
656656
WolfSSLException ex) {
657-
WolfSSLDebug.log(getClass(), WolfSSLDebug.INFO,
657+
WolfSSLDebug.log(getClass(), WolfSSLDebug.ERROR,
658658
() -> "Error getting peer certificate chain: "
659659
+ ex.getMessage());
660+
throw new SSLPeerUnverifiedException(
661+
"Error getting peer certificate chain: " + ex.getMessage());
660662
}
661-
return null;
662663
}
663664

664665
@Override

0 commit comments

Comments
 (0)