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

Side by Side Diff: patches.chromium/0011-export_certificate_types.patch

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 unified diff | Download patch | Annotate | Revision Log
« openssl/ssl/ssl_cert.c ('K') | « openssl/ssl/ssl_cert.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
2 index a3944f1..7c5a4c9 100644
3 --- a/include/openssl/ssl.h
4 +++ b/include/openssl/ssl.h
5 @@ -1982,6 +1982,8 @@ STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(const SSL_ CTX *s);
6 int SSL_add_client_CA(SSL *ssl,X509 *x);
7 int SSL_CTX_add_client_CA(SSL_CTX *ctx,X509 *x);
8
9 +void SSL_get_client_certificate_types(SSL *s, char **ctype, size_t *ctype_num);
10 +
11 void SSL_set_connect_state(SSL *s);
12 void SSL_set_accept_state(SSL *s);
13
14 diff --git a/ssl/ssl.h b/ssl/ssl.h
15 index a3944f1..7c5a4c9 100644
16 --- a/ssl/ssl.h
17 +++ b/ssl/ssl.h
18 @@ -1982,6 +1982,8 @@ STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(const SSL_ CTX *s);
19 int SSL_add_client_CA(SSL *ssl,X509 *x);
20 int SSL_CTX_add_client_CA(SSL_CTX *ctx,X509 *x);
21
22 +void SSL_get_client_certificate_types(SSL *s, char **ctype, size_t *ctype_num);
23 +
24 void SSL_set_connect_state(SSL *s);
25 void SSL_set_accept_state(SSL *s);
26
27 diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c
28 index 5123a89..f9673c2 100644
29 --- a/ssl/ssl_cert.c
30 +++ b/ssl/ssl_cert.c
31 @@ -660,6 +660,22 @@ static int xname_cmp(const X509_NAME * const *a, const X509 _NAME * const *b)
32 return(X509_NAME_cmp(*a,*b));
33 }
34
35 +void SSL_get_client_certificate_types(SSL *s, char **ctype, size_t *ctype_num)
36 + {
37 + /* Nothing to return for the server or SSL2. */
38 + if (s->type != SSL_ST_CONNECT ||
39 + ((s->version >> 8) != SSL3_VERSION_MAJOR) ||
40 + (s->s3 == NULL))
41 + {
42 + *ctype = NULL;
43 + *ctype_num = 0;
44 + return;
45 + }
46 +
47 + *ctype = s->s3->tmp.ctype;
48 + *ctype_num = s->s3->tmp.ctype_num;
49 + }
50 +
51 #ifndef OPENSSL_NO_STDIO
52 /*!
53 * Load CA certs from a file into a ::STACK. Note that it is somewhat misnamed;
OLDNEW
« openssl/ssl/ssl_cert.c ('K') | « openssl/ssl/ssl_cert.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698