| 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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 int SSL_add_client_CA(SSL *ssl,X509 *x) | 648 int SSL_add_client_CA(SSL *ssl,X509 *x) |
| 649 { | 649 { |
| 650 return(add_client_CA(&(ssl->client_CA),x)); | 650 return(add_client_CA(&(ssl->client_CA),x)); |
| 651 } | 651 } |
| 652 | 652 |
| 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 void SSL_get_client_certificate_types(const SSL *s, const unsigned char **ctype, |
| 659 size_t *ctype_num) |
| 660 { |
| 661 if (s->s3 == NULL) |
| 662 { |
| 663 *ctype = NULL; |
| 664 *ctype_num = 0; |
| 665 return; |
| 666 } |
| 667 |
| 668 /* This always returns nothing for the server. */ |
| 669 *ctype = s->s3->tmp.ctype; |
| 670 *ctype_num = s->s3->tmp.ctype_num; |
| 671 } |
| 672 |
| 658 static int xname_cmp(const X509_NAME * const *a, const X509_NAME * const *b) | 673 static int xname_cmp(const X509_NAME * const *a, const X509_NAME * const *b) |
| 659 { | 674 { |
| 660 return(X509_NAME_cmp(*a,*b)); | 675 return(X509_NAME_cmp(*a,*b)); |
| 661 } | 676 } |
| 662 | 677 |
| 663 #ifndef OPENSSL_NO_STDIO | 678 #ifndef OPENSSL_NO_STDIO |
| 664 /*! | 679 /*! |
| 665 * Load CA certs from a file into a ::STACK. Note that it is somewhat misnamed; | 680 * 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 | 681 * 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 | 682 * for a stack of CAs is to send it to the client). Actually, it doesn't have |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 } | 859 } |
| 845 | 860 |
| 846 ret = 1; | 861 ret = 1; |
| 847 | 862 |
| 848 err: | 863 err: |
| 849 if (d) OPENSSL_DIR_end(&d); | 864 if (d) OPENSSL_DIR_end(&d); |
| 850 CRYPTO_w_unlock(CRYPTO_LOCK_READDIR); | 865 CRYPTO_w_unlock(CRYPTO_LOCK_READDIR); |
| 851 return ret; | 866 return ret; |
| 852 } | 867 } |
| 853 | 868 |
| OLD | NEW |