httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i0coj1...@sneakemail.com
Subject How to get mod_ssl's SSL_CTX from another module?
Date Sat, 09 Dec 2006 22:31:57 GMT
I need to use SSL's crypto lib functions to decrypt (using RSA) in another module.

I see that I need to use the SSL_CTX and/or SSL structures to do this.

I assume that I don't call 
  SSL_CTX_new() 
to get the SSL_CTX, it looks like one-time-only, and I assume it's already been done since
mod-ssl is loaded.

So, how do I get the current SSL_CTX (and/or SSL) structure?

Proposed calling sequence is below.

Thanks,
Andy
---------

SSL *ssl;
SSL_CTX *ctx;

<ctx = current SSL_CTX, somehow>

SSL_CTX_use_RSAPrivateKey_file(ctx, ...)
ssl = SSL_new(ctx);
pKey = SSL_get_privatekey(ssl);
RSA_private_decrypt(..., ..., ..., pKey->pkey.rsa, ...)




Mime
View raw message