Don't access EVP_MD internals directly.
authorDr. Stephen Henson <steve@openssl.org>
Fri, 1 Feb 2013 14:29:01 +0000 (14:29 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 5 Feb 2013 16:50:35 +0000 (16:50 +0000)
ssl/s3_cbc.c

index 1819f6cf013e0e5f5504660d7cc7aa0d4769b95f..978769794599b91c9077ae3d15dbe8a85490680a 100644 (file)
@@ -371,7 +371,7 @@ char ssl3_cbc_record_digest_supported(const EVP_MD *digest)
        if (FIPS_mode())
                return 0;
 #endif
-       switch (digest->type)
+       switch (EVP_MD_type(digest))
                {
                case NID_md5:
                case NID_sha1:
@@ -439,7 +439,7 @@ void ssl3_cbc_digest_record(
         * many possible overflows later in this function. */
        OPENSSL_assert(data_plus_mac_plus_padding_size < 1024*1024);
 
-       switch (digest->type)
+       switch (EVP_MD_type(digest))
                {
                case NID_md5:
                        MD5_Init((MD5_CTX*)md_state);