@@ -520,9 +520,9 @@ public synchronized Certificate[] getPeerCertificates()
520520 try {
521521 x509 = this .ssl .getPeerCertificate ();
522522 } catch (IllegalStateException | WolfSSLJNIException ex ) {
523- Logger . getLogger (
524- WolfSSLImplementSSLSession . class . getName ()). log (
525- Level . SEVERE , null , ex );
523+ WolfSSLDebug . log ( getClass (), WolfSSLDebug . INFO ,
524+ () -> "Error getting peer certificate: "
525+ + ex . getMessage () );
526526 x509 = 0 ;
527527 }
528528
@@ -636,9 +636,9 @@ public synchronized javax.security.cert.X509Certificate[] getPeerCertificateChai
636636
637637 } catch (IllegalStateException | WolfSSLJNIException |
638638 WolfSSLException ex ) {
639- Logger . getLogger (
640- WolfSSLImplementSSLSession . class . getName ()). log (
641- Level . SEVERE , null , ex );
639+ WolfSSLDebug . log ( getClass (), WolfSSLDebug . INFO ,
640+ () -> "Error getting peer certificate chain: "
641+ + ex . getMessage () );
642642 }
643643 return null ;
644644 }
@@ -682,9 +682,8 @@ public synchronized Principal getPeerPrincipal()
682682
683683 } catch (IllegalStateException | WolfSSLJNIException |
684684 WolfSSLException ex ) {
685- Logger .getLogger (
686- WolfSSLImplementSSLSession .class .getName ()).log (
687- Level .SEVERE , null , ex );
685+ WolfSSLDebug .log (getClass (), WolfSSLDebug .INFO ,
686+ () -> "Error getting peer principal: " + ex .getMessage ());
688687 }
689688 return null ;
690689 }
@@ -735,9 +734,8 @@ public synchronized String getCipherSuite() {
735734 return currentCipher ;
736735 }
737736 } catch (IllegalStateException | WolfSSLJNIException ex ) {
738- Logger .getLogger (
739- WolfSSLImplementSSLSession .class .getName ()).log (
740- Level .SEVERE , null , ex );
737+ WolfSSLDebug .log (getClass (), WolfSSLDebug .INFO ,
738+ () -> "Error getting cipher suite: " + ex .getMessage ());
741739 }
742740
743741 return this .cipherSuite ;
@@ -815,9 +813,9 @@ public synchronized int getPacketBufferSize() {
815813 this .packetBufSz = ret ;
816814 }
817815 } catch (IllegalStateException ex ) {
818- Logger . getLogger (
819- WolfSSLImplementSSLSession . class . getName ()). log (
820- Level . SEVERE , null , ex );
816+ WolfSSLDebug . log ( getClass (), WolfSSLDebug . INFO ,
817+ () -> "Error getting packet buffer size: "
818+ + ex . getMessage () );
821819 /* If ssl.getMaxOutputSize failed, check for cached value */
822820 if (this .packetBufSz > ret ) {
823821 ret = this .packetBufSz ;
0 commit comments