Additional CVE-2014-0224 protection.
[openssl.git] / ssl / ssl_asn1.c
index d8415b88061e9c5553a9e9f3a1c3c6da9c589c0c..4775003710271ef6ee4462a96d948b6f61f59125 100644 (file)
@@ -84,7 +84,6 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <openssl/crypto.h>
 #include "ssl_locl.h"
 #include <openssl/asn1_mac.h>
 #include <openssl/objects.h>
@@ -409,6 +408,7 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
                if (os.length != 3)
                        {
                        c.error=SSL_R_CIPHER_CODE_WRONG_LENGTH;
+                       c.line=__LINE__;
                        goto err;
                        }
                id=0x02000000L|
@@ -421,6 +421,7 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
                if (os.length != 2)
                        {
                        c.error=SSL_R_CIPHER_CODE_WRONG_LENGTH;
+                       c.line=__LINE__;
                        goto err;
                        }
                id=0x03000000L|
@@ -430,6 +431,7 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
        else
                {
                c.error=SSL_R_UNKNOWN_SSL_VERSION;
+               c.line=__LINE__;
                goto err;
                }
        
@@ -522,6 +524,7 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
            if (os.length > SSL_MAX_SID_CTX_LENGTH)
                {
                c.error=SSL_R_BAD_LENGTH;
+               c.line=__LINE__;
                goto err;
                }
            else