From: Adam Chlipala Date: Sun, 3 Sep 2006 03:36:50 +0000 (+0000) Subject: Server gets client's CN X-Git-Tag: release_2010-11-19~351 X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/commitdiff_plain/19f3c4e664808d8dafabd9674635d9069bafd7cb Server gets client's CN --- diff --git a/openssl/openssl_sml.c b/openssl/openssl_sml.c index 79e6195..c475c30 100644 --- a/openssl/openssl_sml.c +++ b/openssl/openssl_sml.c @@ -240,3 +240,7 @@ const char *OpenSSL_SML_get_peer_name(SSL *ssl) { BIO *OpenSSL_SML_pop(BIO *b) { return BIO_pop(b); } + +BIO *OpenSSL_SML_next(BIO *b) { + return BIO_next(b); +} diff --git a/openssl/openssl_sml.h b/openssl/openssl_sml.h index d921bee..6b02579 100644 --- a/openssl/openssl_sml.h +++ b/openssl/openssl_sml.h @@ -57,3 +57,4 @@ BIO *OpenSSL_SML_new_ssl(SSL_CTX *ctx); BIO *OpenSSL_SML_new_accept(SSL_CTX *ctx, char *port); BIO *OpenSSL_SML_pop(BIO *b); +BIO *OpenSSL_SML_next(BIO *b); diff --git a/src/main.sml b/src/main.sml index 58b9768..0e1e503 100644 --- a/src/main.sml +++ b/src/main.sml @@ -172,7 +172,7 @@ fun service () = NONE => () | SOME bio => let - (*val _ = print ("Subject: " ^ OpenSSL.peerCN bio ^ "\n")*) + val _ = print ("Subject: " ^ OpenSSL.peerCN bio ^ "\n") fun loop' () = case OpenSSL.readOne bio of diff --git a/src/openssl.sig b/src/openssl.sig index ef6403d..3179103 100644 --- a/src/openssl.sig +++ b/src/openssl.sig @@ -42,6 +42,5 @@ val shutdown : listener -> unit val accept : listener -> bio option val peerCN : bio -> string -val acceptPeerCN : bio -> string end diff --git a/src/openssl.sml b/src/openssl.sml index ea91848..dd9fa7d 100644 --- a/src/openssl.sml +++ b/src/openssl.sml @@ -197,6 +197,4 @@ fun peerCN bio = ZString.toML' subj end -fun acceptPeerCN bio = peerCN (F_OpenSSL_SML_next.f' bio) - end