OLD | NEW |
---|---|
1 /*! \file ssl/ssl_cert.c */ | 1 /*! \file ssl/ssl_cert.c */ |
2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * This package is an SSL implementation written | 5 * This package is an SSL implementation written |
6 * by Eric Young (eay@cryptsoft.com). | 6 * by Eric Young (eay@cryptsoft.com). |
7 * The implementation was written so as to conform with Netscapes SSL. | 7 * The implementation was written so as to conform with Netscapes SSL. |
8 * | 8 * |
9 * This library is free for commercial and non-commercial use as long as | 9 * This library is free for commercial and non-commercial use as long as |
10 * the following conditions are aheared to. The following conditions | 10 * the following conditions are aheared to. The following conditions |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
653 int SSL_CTX_add_client_CA(SSL_CTX *ctx,X509 *x) | 653 int SSL_CTX_add_client_CA(SSL_CTX *ctx,X509 *x) |
654 { | 654 { |
655 return(add_client_CA(&(ctx->client_CA),x)); | 655 return(add_client_CA(&(ctx->client_CA),x)); |
656 } | 656 } |
657 | 657 |
658 static int xname_cmp(const X509_NAME * const *a, const X509_NAME * const *b) | 658 static int xname_cmp(const X509_NAME * const *a, const X509_NAME * const *b) |
659 { | 659 { |
660 return(X509_NAME_cmp(*a,*b)); | 660 return(X509_NAME_cmp(*a,*b)); |
661 } | 661 } |
662 | 662 |
663 void SSL_get_client_certificate_types(const SSL *s, const char **ctype, size_t * ctype_num) | |
wtc
2014/05/06 17:10:08
1. Nit: this line may need to be folded.
2. Nit:
davidben
2014/05/06 21:54:02
Done.
| |
664 { | |
665 if (s->s3 == NULL) | |
666 { | |
667 *ctype = NULL; | |
668 *ctype_num = 0; | |
669 return; | |
670 } | |
671 | |
672 /* This always returns nothing for the server. */ | |
673 *ctype = s->s3->tmp.ctype; | |
674 *ctype_num = s->s3->tmp.ctype_num; | |
675 } | |
676 | |
663 #ifndef OPENSSL_NO_STDIO | 677 #ifndef OPENSSL_NO_STDIO |
664 /*! | 678 /*! |
665 * Load CA certs from a file into a ::STACK. Note that it is somewhat misnamed; | 679 * Load CA certs from a file into a ::STACK. Note that it is somewhat misnamed; |
666 * it doesn't really have anything to do with clients (except that a common use | 680 * it doesn't really have anything to do with clients (except that a common use |
667 * for a stack of CAs is to send it to the client). Actually, it doesn't have | 681 * for a stack of CAs is to send it to the client). Actually, it doesn't have |
668 * much to do with CAs, either, since it will load any old cert. | 682 * much to do with CAs, either, since it will load any old cert. |
669 * \param file the file containing one or more certs. | 683 * \param file the file containing one or more certs. |
670 * \return a ::STACK containing the certs. | 684 * \return a ::STACK containing the certs. |
671 */ | 685 */ |
672 STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file) | 686 STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file) |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
844 } | 858 } |
845 | 859 |
846 ret = 1; | 860 ret = 1; |
847 | 861 |
848 err: | 862 err: |
849 if (d) OPENSSL_DIR_end(&d); | 863 if (d) OPENSSL_DIR_end(&d); |
850 CRYPTO_w_unlock(CRYPTO_LOCK_READDIR); | 864 CRYPTO_w_unlock(CRYPTO_LOCK_READDIR); |
851 return ret; | 865 return ret; |
852 } | 866 } |
853 | 867 |
OLD | NEW |