public ReferenceCountedOpenSslContext getServerReferenceCountedOpenSslContext ( boolean enableOcsp ) throws SSLException { if ( sslConfig . getKeyStore ( ) != null ) { sslContextBuilder = serverContextBuilderWithKs ( SslProvider . OPENSSL ) ; } else { sslContextBuilder = serverContextBuilderWithCerts ( SslProvider . OPENSSL ) ; } setOcspStapling ( sslContextBuilder , enableOcsp ) ; if ( sslConfig . getCipherSuites ( ) != null ) { List < String > ciphers = Arrays . asList ( sslConfig . getCipherSuites ( ) ) ; setCiphers ( sslContextBuilder , ciphers ) ; } setSslProtocol ( sslContextBuilder ) ; ReferenceCountedOpenSslContext referenceCountedOpenSslCtx = ( ReferenceCountedOpenSslContext ) sslContextBuilder . build ( ) ; int sessionTimeout = sslConfig . getSessionTimeOut ( ) ; if ( sessionTimeout > 0 ) { referenceCountedOpenSslCtx . sessionContext ( ) . setSessionTimeout ( sessionTimeout ) ; } return referenceCountedOpenSslCtx ; }
This used to create the open ssl context when ocsp stapling is enabled for server .