Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Unified Diff: openssl/ssl/ssl_cert.c

Issue 254723002: Add SSL_get_client_certificate_types. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/openssl
Patch Set: README.chromium Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « openssl/ssl/ssl.h ('k') | patches.chromium/0011-export_certificate_types.patch » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: openssl/ssl/ssl_cert.c
diff --git a/openssl/ssl/ssl_cert.c b/openssl/ssl/ssl_cert.c
index 5123a89182e590267edcb5b382ab5a767128fb85..f9673c23a0aaac2731f13a3b90bbb89e06bf7c7f 100644
--- a/openssl/ssl/ssl_cert.c
+++ b/openssl/ssl/ssl_cert.c
@@ -660,6 +660,22 @@ static int xname_cmp(const X509_NAME * const *a, const X509_NAME * const *b)
return(X509_NAME_cmp(*a,*b));
}
+void SSL_get_client_certificate_types(SSL *s, char **ctype, size_t *ctype_num)
+ {
+ /* Nothing to return for the server or SSL2. */
+ if (s->type != SSL_ST_CONNECT ||
agl 2014/04/25 01:03:35 Maybe: if (s->server ||
davidben 2014/04/25 17:03:34 Done.
+ ((s->version >> 8) != SSL3_VERSION_MAJOR) ||
agl 2014/04/25 01:03:35 s->version > SSL3_VERSION && s->version != DTLS1_B
davidben 2014/04/25 17:03:34 Do you mean < SSL3_VERSION? Did that version. (Oww
+ (s->s3 == NULL))
+ {
+ *ctype = NULL;
+ *ctype_num = 0;
+ return;
+ }
+
+ *ctype = s->s3->tmp.ctype;
+ *ctype_num = s->s3->tmp.ctype_num;
+ }
+
#ifndef OPENSSL_NO_STDIO
/*!
* Load CA certs from a file into a ::STACK. Note that it is somewhat misnamed;
« no previous file with comments | « openssl/ssl/ssl.h ('k') | patches.chromium/0011-export_certificate_types.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698