ssl_lib.c (246772) | ssl_lib.c (261037) |
---|---|
1/*! \file ssl/ssl_lib.c 2 * \brief Version independent SSL functions. 3 */ 4/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 5 * All rights reserved. 6 * 7 * This package is an SSL implementation written 8 * by Eric Young (eay@cryptsoft.com). --- 1783 unchanged lines hidden (view full) --- 1792 } 1793 1794 if ((ret->client_CA=sk_X509_NAME_new_null()) == NULL) 1795 goto err; 1796 1797 CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_CTX, ret, &ret->ex_data); 1798 1799 ret->extra_certs=NULL; | 1/*! \file ssl/ssl_lib.c 2 * \brief Version independent SSL functions. 3 */ 4/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 5 * All rights reserved. 6 * 7 * This package is an SSL implementation written 8 * by Eric Young (eay@cryptsoft.com). --- 1783 unchanged lines hidden (view full) --- 1792 } 1793 1794 if ((ret->client_CA=sk_X509_NAME_new_null()) == NULL) 1795 goto err; 1796 1797 CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_CTX, ret, &ret->ex_data); 1798 1799 ret->extra_certs=NULL; |
1800 ret->comp_methods=SSL_COMP_get_compression_methods(); | 1800 /* No compression for DTLS */ 1801 if (meth->version != DTLS1_VERSION) 1802 ret->comp_methods=SSL_COMP_get_compression_methods(); |
1801 1802 ret->max_send_fragment = SSL3_RT_MAX_PLAIN_LENGTH; 1803 1804#ifndef OPENSSL_NO_TLSEXT 1805 ret->tlsext_servername_callback = 0; 1806 ret->tlsext_servername_arg = NULL; 1807 /* Setup RFC4507 ticket keys */ 1808 if ((RAND_pseudo_bytes(ret->tlsext_tick_key_name, 16) <= 0) --- 978 unchanged lines hidden (view full) --- 2787 s->compress=NULL; 2788 } 2789#endif 2790 } 2791 2792/* Fix this function so that it takes an optional type parameter */ 2793X509 *SSL_get_certificate(const SSL *s) 2794 { | 1803 1804 ret->max_send_fragment = SSL3_RT_MAX_PLAIN_LENGTH; 1805 1806#ifndef OPENSSL_NO_TLSEXT 1807 ret->tlsext_servername_callback = 0; 1808 ret->tlsext_servername_arg = NULL; 1809 /* Setup RFC4507 ticket keys */ 1810 if ((RAND_pseudo_bytes(ret->tlsext_tick_key_name, 16) <= 0) --- 978 unchanged lines hidden (view full) --- 2789 s->compress=NULL; 2790 } 2791#endif 2792 } 2793 2794/* Fix this function so that it takes an optional type parameter */ 2795X509 *SSL_get_certificate(const SSL *s) 2796 { |
2795 if (s->server) 2796 return(ssl_get_server_send_cert(s)); 2797 else if (s->cert != NULL) | 2797 if (s->cert != NULL) |
2798 return(s->cert->key->x509); 2799 else 2800 return(NULL); 2801 } 2802 2803/* Fix this function so that it takes an optional type parameter */ 2804EVP_PKEY *SSL_get_privatekey(SSL *s) 2805 { --- 460 unchanged lines hidden --- | 2798 return(s->cert->key->x509); 2799 else 2800 return(NULL); 2801 } 2802 2803/* Fix this function so that it takes an optional type parameter */ 2804EVP_PKEY *SSL_get_privatekey(SSL *s) 2805 { --- 460 unchanged lines hidden --- |