diff options
author | Adam Langley <agl@chromium.org> | 2014-06-20 23:00:00 +0400 |
---|---|---|
committer | Adam Langley <agl@chromium.org> | 2014-06-21 00:17:36 +0400 |
commit | 28acbbc2d6d2fdd9717c6e7e55c5c0e14608a0f0 (patch) | |
tree | 259d466c04b7248766d02fe6c88e28445a4197ff /ssl/ssl_cert.c | |
parent | 64bda23cad8cb912a55328ee9a298ca4d9795477 (diff) |
Add SSL_get_client_certificate_types.
Exposes the certificate_types parameter in a CertificateRequest.
Transplanted from https://codereview.chromium.org/254723002/
Diffstat (limited to 'ssl/ssl_cert.c')
-rw-r--r-- | ssl/ssl_cert.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c index 4fa041b6..e914958b 100644 --- a/ssl/ssl_cert.c +++ b/ssl/ssl_cert.c @@ -1017,6 +1017,21 @@ int SSL_CTX_add_client_CA(SSL_CTX *ctx,X509 *x) return(add_client_CA(&(ctx->client_CA),x)); } +void SSL_get_client_certificate_types(const SSL *s, const unsigned char **ctype, + size_t *ctype_num) + { + if (s->s3 == NULL) + { + *ctype = NULL; + *ctype_num = 0; + return; + } + + /* This always returns nothing for the server. */ + *ctype = s->s3->tmp.ctype; + *ctype_num = s->s3->tmp.ctype_num; + } + static int xname_cmp(const X509_NAME **a, const X509_NAME **b) { return(X509_NAME_cmp(*a,*b)); |