Add patch to crypto/evp which didn't apply from PR#2124
authorDr. Stephen Henson <steve@openssl.org>
Wed, 9 Dec 2009 15:01:39 +0000 (15:01 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 9 Dec 2009 15:01:39 +0000 (15:01 +0000)
crypto/evp/digest.c
ssl/d1_clnt.c
ssl/d1_srvr.c
ssl/s3_pkt.c
ssl/ssl.h
ssl/ssl_err.c

index d6abcfe1d6604a47e9b21a859452075ccbeb5a0d..bd520456b160147309c2bb430b3e7b2841d6ea2f 100644 (file)
@@ -203,6 +203,12 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
                        {
                        ctx->update = type->update;
                        ctx->md_data=OPENSSL_malloc(type->ctx_size);
+                       if (ctx->md_data == NULL)
+                               {
+                               EVPerr(EVP_F_EVP_DIGESTINIT_EX,
+                                                       ERR_R_MALLOC_FAILURE);
+                               return 0;
+                               }
                        }
                }
 #ifndef OPENSSL_NO_ENGINE
index 57c1033f55400c164f2a296b49ccdb6d5c4c5ecf..5317a51180b61c69694d8ee006b5a0d835f35ad5 100644 (file)
@@ -698,7 +698,7 @@ int dtls1_client_hello(SSL *s)
 #ifndef OPENSSL_NO_TLSEXT
                if ((p = ssl_add_clienthello_tlsext(s, p, buf+SSL3_RT_MAX_PLAIN_LENGTH)) == NULL)
                        {
-                       SSLerr(SSL_F_SSL3_CLIENT_HELLO,ERR_R_INTERNAL_ERROR);
+                       SSLerr(SSL_F_DTLS1_CLIENT_HELLO,ERR_R_INTERNAL_ERROR);
                        goto err;
                        }
 #endif         
index 007542f53482aa4102094428ce72d46437d9894f..fb64d49166c0b68c3010a3f2a9463a6ae3299c99 100644 (file)
@@ -814,7 +814,7 @@ int dtls1_send_server_hello(SSL *s)
 #ifndef OPENSSL_NO_TLSEXT
                if ((p = ssl_add_serverhello_tlsext(s, p, buf+SSL3_RT_MAX_PLAIN_LENGTH)) == NULL)
                        {
-                       SSLerr(SSL_F_SSL3_SEND_SERVER_HELLO,ERR_R_INTERNAL_ERROR);
+                       SSLerr(SSL_F_DTLS1_SEND_SERVER_HELLO,ERR_R_INTERNAL_ERROR);
                        return -1;
                        }
 #endif
index 808505771d3a4feffe500acf1bd7cc010566ed9c..9f2e16de878430c614e3711042b91d8b71e6216a 100644 (file)
@@ -789,8 +789,8 @@ static int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
 
        if (eivlen)
                {
-               if (RAND_pseudo_bytes(p, eivlen) <= 0)
-                       goto err;
+       /*      if (RAND_pseudo_bytes(p, eivlen) <= 0)
+                       goto err; */
                wr->length += eivlen;
                }
 
index 4d53ef80f48afe3bb10febb3a6c71dea3b5f98ed..897a8ca052795baf1a2febe5fe0919546d00fef7 100644 (file)
--- a/ssl/ssl.h
+++ b/ssl/ssl.h
@@ -2159,6 +2159,7 @@ void ERR_load_SSL_strings(void);
 #define SSL_R_NO_PRIVATE_KEY_ASSIGNED                   190
 #define SSL_R_NO_PROTOCOLS_AVAILABLE                    191
 #define SSL_R_NO_PUBLICKEY                              192
+#define SSL_R_NO_RENEGOTIATION                          339
 #define SSL_R_NO_REQUIRED_DIGEST                        324
 #define SSL_R_NO_SHARED_CIPHER                          193
 #define SSL_R_NO_VERIFY_CALLBACK                        194
index 7540bd4ebdfd391e739225d41ff8ba7f21c6a4f6..f47e4a5099053836f61120b2342a1b72a1e5def1 100644 (file)
@@ -414,6 +414,7 @@ static ERR_STRING_DATA SSL_str_reasons[]=
 {ERR_REASON(SSL_R_NO_PRIVATE_KEY_ASSIGNED),"no private key assigned"},
 {ERR_REASON(SSL_R_NO_PROTOCOLS_AVAILABLE),"no protocols available"},
 {ERR_REASON(SSL_R_NO_PUBLICKEY)          ,"no publickey"},
+{ERR_REASON(SSL_R_NO_RENEGOTIATION)      ,"no renegotiation"},
 {ERR_REASON(SSL_R_NO_REQUIRED_DIGEST)    ,"digest requred for handshake isn't computed"},
 {ERR_REASON(SSL_R_NO_SHARED_CIPHER)      ,"no shared cipher"},
 {ERR_REASON(SSL_R_NO_VERIFY_CALLBACK)    ,"no verify callback"},