module's development and ssl

Igor Sysoev is at rambler-co.ru
Wed Mar 12 18:03:19 MSK 2008


On Wed, Mar 12, 2008 at 03:50:51PM +0100, Chavelle Vincent wrote:

> Igor Sysoev wrote:
> > Look
> > ngx_ssl_get_subject_dn()
> > ngx_ssl_get_issuer_dn()
> > ngx_ssl_get_serial_number()
> 
> ngx_ssl_get_serial_number() return me "02\n". I would like the hash key 
> from public certificate. The string between BEGIN CERTIFICATE and END 
> CERTIFICATE. Is it possible ?

Look ngx_ssl_get_serial_number() implementation.
It gets client certificate via

    cert = SSL_get_peer_certificate(c->ssl->connection);
    if (cert == NULL) {
        return NGX_OK;
    }

and then using some OpenSSL functions it gets serial number.
Do the same for hash key.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list