Skip to content

Commit

Permalink
Extra null check
Browse files Browse the repository at this point in the history
  • Loading branch information
bdw429s committed Mar 15, 2024
1 parent 5341ae8 commit 34ef669
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.2-0069a6ce9838109e18344f96b4a1d97f322a260d-96ea216b7cfb6883a6af15c191a94953a0596b9c
5.0.3-5341ae82cb44255ff7d3b0b9ba4d95f60494b9a2-96ea216b7cfb6883a6af15c191a94953a0596b9c
2 changes: 1 addition & 1 deletion src/main/java/runwar/undertow/SSLCertHeaderHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public void handleRequest(HttpServerExchange exchange) throws Exception {
setCGIElement( exchange, CERT_KEYSIZE, String.valueOf( ssl.getKeySize() ) );

// Set details of the server cert so it's in our CGI scope
if( ssl.getSSLSession().getLocalCertificates() != null ) {
if( ssl.getSSLSession() != null && ssl.getSSLSession().getLocalCertificates() != null ) {
Certificate[] serverCerts = ssl.getSSLSession().getLocalCertificates();
if(serverCerts.length > 0 && serverCerts[0] instanceof X509Certificate ) {
X509Certificate serverCert = (X509Certificate)serverCerts[0];
Expand Down

0 comments on commit 34ef669

Please sign in to comment.