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

Side by Side Diff: patches.chromium/0015-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: Rename patch file. Created 6 years, 7 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
« no previous file with comments | « 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 android-openssl.orig/include/openssl/ssl.h android-openssl/include/op enssl/ssl.h
2 index a3944f1..e559608 100644
3 --- android-openssl.orig/include/openssl/ssl.h
4 +++ android-openssl/include/openssl/ssl.h
5 @@ -1982,6 +1982,9 @@ 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(const SSL *s, const unsigned char **ctype ,
10 + size_t *ctype_num);
11 +
12 void SSL_set_connect_state(SSL *s);
13 void SSL_set_accept_state(SSL *s);
14
15 diff --git android-openssl.orig/include/openssl/ssl3.h android-openssl/include/o penssl/ssl3.h
16 index 899c8a8..019e8d8 100644
17 --- android-openssl.orig/include/openssl/ssl3.h
18 +++ android-openssl/include/openssl/ssl3.h
19 @@ -508,7 +508,7 @@ typedef struct ssl3_state_st
20 /* used for certificate requests */
21 int cert_req;
22 int ctype_num;
23 - char ctype[SSL3_CT_NUMBER];
24 + unsigned char ctype[SSL3_CT_NUMBER];
25 STACK_OF(X509_NAME) *ca_names;
26
27 int use_rsa_tmp;
28 diff --git android-openssl.orig/ssl/ssl.h android-openssl/ssl/ssl.h
29 index a3944f1..e559608 100644
30 --- android-openssl.orig/ssl/ssl.h
31 +++ android-openssl/ssl/ssl.h
32 @@ -1982,6 +1982,9 @@ STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(const SSL_ CTX *s);
33 int SSL_add_client_CA(SSL *ssl,X509 *x);
34 int SSL_CTX_add_client_CA(SSL_CTX *ctx,X509 *x);
35
36 +void SSL_get_client_certificate_types(const SSL *s, const unsigned char **ctype ,
37 + size_t *ctype_num);
38 +
39 void SSL_set_connect_state(SSL *s);
40 void SSL_set_accept_state(SSL *s);
41
42 diff --git android-openssl.orig/ssl/ssl3.h android-openssl/ssl/ssl3.h
43 index 899c8a8..019e8d8 100644
44 --- android-openssl.orig/ssl/ssl3.h
45 +++ android-openssl/ssl/ssl3.h
46 @@ -508,7 +508,7 @@ typedef struct ssl3_state_st
47 /* used for certificate requests */
48 int cert_req;
49 int ctype_num;
50 - char ctype[SSL3_CT_NUMBER];
51 + unsigned char ctype[SSL3_CT_NUMBER];
52 STACK_OF(X509_NAME) *ca_names;
53
54 int use_rsa_tmp;
55 diff --git android-openssl.orig/ssl/ssl_cert.c android-openssl/ssl/ssl_cert.c
56 index 5123a89..8a61650 100644
57 --- android-openssl.orig/ssl/ssl_cert.c
58 +++ android-openssl/ssl/ssl_cert.c
59 @@ -655,6 +655,21 @@ int SSL_CTX_add_client_CA(SSL_CTX *ctx,X509 *x)
60 return(add_client_CA(&(ctx->client_CA),x));
61 }
62
63 +void SSL_get_client_certificate_types(const SSL *s, const unsigned char **ctype ,
64 + size_t *ctype_num)
65 + {
66 + if (s->s3 == NULL)
67 + {
68 + *ctype = NULL;
69 + *ctype_num = 0;
70 + return;
71 + }
72 +
73 + /* This always returns nothing for the server. */
74 + *ctype = s->s3->tmp.ctype;
75 + *ctype_num = s->s3->tmp.ctype_num;
76 + }
77 +
78 static int xname_cmp(const X509_NAME * const *a, const X509_NAME * const *b)
79 {
80 return(X509_NAME_cmp(*a,*b));
OLDNEW
« no previous file with comments | « openssl/ssl/ssl_cert.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698