diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2000-02-25 00:23:48 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2000-02-25 00:23:48 +0000 |
commit | fbb41ae0ad1369d6fe8d6c72d2297270ad24f0e5 (patch) | |
tree | 00bde81820163221f0244bc0a9b6d9e276df57a3 /ssl | |
parent | 766d78c8f5a85205a44aaf6182ed337b981f824b (diff) |
Allow code which calls RSA temp key callback to cope
with a failure.
Fix typos in some error codes.
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/s3_srvr.c | 6 | ||||
-rw-r--r-- | ssl/ssl.h | 1 | ||||
-rw-r--r-- | ssl/ssl_err.c | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index 7c6993643f..90806e2d99 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -955,6 +955,12 @@ static int ssl3_send_server_key_exchange(SSL *s) rsa=s->cert->rsa_tmp_cb(s, SSL_C_IS_EXPORT(s->s3->tmp.new_cipher), SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher)); + if(rsa == NULL) + { + al=SSL_AD_HANDSHAKE_FAILURE; + SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,SSL_R_ERROR_GENERATING_TMP_RSA_KEY); + goto f_err; + } CRYPTO_add(&rsa->references,1,CRYPTO_LOCK_RSA); cert->rsa_tmp=rsa; } @@ -1372,6 +1372,7 @@ int SSL_COMP_add_compression_method(int id,char *cm); #define SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG 148 #define SSL_R_DIGEST_CHECK_FAILED 149 #define SSL_R_ENCRYPTED_LENGTH_TOO_LONG 150 +#define SSL_R_ERROR_GENERATING_TMP_RSA_KEY 1092 #define SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST 151 #define SSL_R_EXCESSIVE_MESSAGE_SIZE 152 #define SSL_R_EXTRA_DATA_IN_MESSAGE 153 diff --git a/ssl/ssl_err.c b/ssl/ssl_err.c index c722544dd4..5618e34a30 100644 --- a/ssl/ssl_err.c +++ b/ssl/ssl_err.c @@ -255,6 +255,7 @@ static ERR_STRING_DATA SSL_str_reasons[]= {SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG ,"dh public value length is wrong"}, {SSL_R_DIGEST_CHECK_FAILED ,"digest check failed"}, {SSL_R_ENCRYPTED_LENGTH_TOO_LONG ,"encrypted length too long"}, +{SSL_R_ERROR_GENERATING_TMP_RSA_KEY ,"error generating tmp rsa key"}, {SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST ,"error in received cipher list"}, {SSL_R_EXCESSIVE_MESSAGE_SIZE ,"excessive message size"}, {SSL_R_EXTRA_DATA_IN_MESSAGE ,"extra data in message"}, |