Include openssl/crypto.h first in several other files so FIPS renaming
[openssl.git] / ssl / ssl_asn1.c
index 28709978b5384d96477678146c8f3f746c66a4ca..74c238a04369e377c8f44da0c0ec42f62661ce86 100644 (file)
@@ -84,6 +84,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <openssl/crypto.h>
 #include "ssl_locl.h"
 #include <openssl/asn1_mac.h>
 #include <openssl/objects.h>
@@ -357,7 +358,7 @@ int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp)
 SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
                             long length)
        {
-       int version,ssl_version=0,i;
+       int ssl_version=0,i;
        long id;
        ASN1_INTEGER ai,*aip;
        ASN1_OCTET_STRING os,*osp;
@@ -371,7 +372,6 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
 
        ai.data=NULL; ai.length=0;
        M_ASN1_D2I_get_x(ASN1_INTEGER,aip,d2i_ASN1_INTEGER);
-       version=(int)ASN1_INTEGER_get(aip);
        if (ai.data != NULL) { OPENSSL_free(ai.data); ai.data=NULL; ai.length=0; }
 
        /* we don't care about the version right now :-) */