static void ssl_destroy(pj_ssl_sock_t *ssock)
{
    ossl_sock_t *ossock = (ossl_sock_t *)ssock;

    /* Destroy SSL instance */
    if (ossock->ossl_ssl) {
	SSL_free(ossock->ossl_ssl); /* this will also close BIOs */
	ossock->ossl_ssl = NULL;
    }

    /* Destroy SSL context */
    if (ossock->ossl_ctx) {
	SSL_CTX_free(ossock->ossl_ctx);
	ossock->ossl_ctx = NULL;
    }

    /* Potentially shutdown OpenSSL library if this is the last
     * context exists.
     */
    shutdown_openssl();
}
static void ssl_destroy(pj_ssl_sock_t *ssock)
{
    ossl_sock_t *ossock = (ossl_sock_t *)ssock;

     
    if (ossock->ossl_ssl) {
	SSL_free(ossock->ossl_ssl);  
	ossock->ossl_ssl = NULL;
    }

     
    if (ossock->ossl_ctx) {
	SSL_CTX_free(ossock->ossl_ctx);
	ossock->ossl_ctx = NULL;
    }

     
    shutdown_openssl();
}