| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 51 * SUCH DAMAGE. | 51 * SUCH DAMAGE. |
| 52 * | 52 * |
| 53 * The licence and distribution terms for any publically available version or | 53 * The licence and distribution terms for any publically available version or |
| 54 * derivative of this code cannot be changed. i.e. this code cannot simply be | 54 * derivative of this code cannot be changed. i.e. this code cannot simply be |
| 55 * copied and put under another distribution licence | 55 * copied and put under another distribution licence |
| 56 * [including the GNU Public Licence.] | 56 * [including the GNU Public Licence.] |
| 57 */ | 57 */ |
| 58 /* ==================================================================== | 58 /* ==================================================================== |
| 59 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. | 59 * Copyright (c) 1998-2007 The OpenSSL Project. All rights reserved. |
| 60 * | 60 * |
| 61 * Redistribution and use in source and binary forms, with or without | 61 * Redistribution and use in source and binary forms, with or without |
| 62 * modification, are permitted provided that the following conditions | 62 * modification, are permitted provided that the following conditions |
| 63 * are met: | 63 * are met: |
| 64 * | 64 * |
| 65 * 1. Redistributions of source code must retain the above copyright | 65 * 1. Redistributions of source code must retain the above copyright |
| 66 * notice, this list of conditions and the following disclaimer. | 66 * notice, this list of conditions and the following disclaimer. |
| 67 * | 67 * |
| 68 * 2. Redistributions in binary form must reproduce the above copyright | 68 * 2. Redistributions in binary form must reproduce the above copyright |
| 69 * notice, this list of conditions and the following disclaimer in | 69 * notice, this list of conditions and the following disclaimer in |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 return(NULL); | 190 return(NULL); |
| 191 } | 191 } |
| 192 | 192 |
| 193 memset(ret, 0, sizeof(CERT)); | 193 memset(ret, 0, sizeof(CERT)); |
| 194 | 194 |
| 195 ret->key = &ret->pkeys[cert->key - &cert->pkeys[0]]; | 195 ret->key = &ret->pkeys[cert->key - &cert->pkeys[0]]; |
| 196 /* or ret->key = ret->pkeys + (cert->key - cert->pkeys), | 196 /* or ret->key = ret->pkeys + (cert->key - cert->pkeys), |
| 197 * if you find that more readable */ | 197 * if you find that more readable */ |
| 198 | 198 |
| 199 ret->valid = cert->valid; | 199 ret->valid = cert->valid; |
| 200 » ret->mask = cert->mask; | 200 » ret->mask_k = cert->mask_k; |
| 201 » ret->export_mask = cert->export_mask; | 201 » ret->mask_a = cert->mask_a; |
| 202 » ret->export_mask_k = cert->export_mask_k; |
| 203 » ret->export_mask_a = cert->export_mask_a; |
| 202 | 204 |
| 203 #ifndef OPENSSL_NO_RSA | 205 #ifndef OPENSSL_NO_RSA |
| 204 if (cert->rsa_tmp != NULL) | 206 if (cert->rsa_tmp != NULL) |
| 205 { | 207 { |
| 206 RSA_up_ref(cert->rsa_tmp); | 208 RSA_up_ref(cert->rsa_tmp); |
| 207 ret->rsa_tmp = cert->rsa_tmp; | 209 ret->rsa_tmp = cert->rsa_tmp; |
| 208 } | 210 } |
| 209 ret->rsa_tmp_cb = cert->rsa_tmp_cb; | 211 ret->rsa_tmp_cb = cert->rsa_tmp_cb; |
| 210 #endif | 212 #endif |
| 211 | 213 |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 } | 825 } |
| 824 | 826 |
| 825 ret = 1; | 827 ret = 1; |
| 826 | 828 |
| 827 err: | 829 err: |
| 828 if (d) OPENSSL_DIR_end(&d); | 830 if (d) OPENSSL_DIR_end(&d); |
| 829 CRYPTO_w_unlock(CRYPTO_LOCK_READDIR); | 831 CRYPTO_w_unlock(CRYPTO_LOCK_READDIR); |
| 830 return ret; | 832 return ret; |
| 831 } | 833 } |
| 832 | 834 |
| OLD | NEW |