Fix no-cmac
There were a couple of CMAC references without OPENSSL_NO_CMAC guards. Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
		@@ -86,7 +86,9 @@ static const EVP_PKEY_ASN1_METHOD *standard_methods[] = {
 | 
				
			|||||||
    &eckey_asn1_meth,
 | 
					    &eckey_asn1_meth,
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
    &hmac_asn1_meth,
 | 
					    &hmac_asn1_meth,
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_CMAC
 | 
				
			||||||
    &cmac_asn1_meth,
 | 
					    &cmac_asn1_meth,
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
#ifndef OPENSSL_NO_DH
 | 
					#ifndef OPENSSL_NO_DH
 | 
				
			||||||
    &dhx_asn1_meth
 | 
					    &dhx_asn1_meth
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -86,7 +86,9 @@ static const EVP_PKEY_METHOD *standard_methods[] = {
 | 
				
			|||||||
    &ec_pkey_meth,
 | 
					    &ec_pkey_meth,
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
    &hmac_pkey_meth,
 | 
					    &hmac_pkey_meth,
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_CMAC
 | 
				
			||||||
    &cmac_pkey_meth,
 | 
					    &cmac_pkey_meth,
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
#ifndef OPENSSL_NO_DH
 | 
					#ifndef OPENSSL_NO_DH
 | 
				
			||||||
    &dhx_pkey_meth,
 | 
					    &dhx_pkey_meth,
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1022,11 +1022,16 @@ static int mac_test_init(struct evp_test *t, const char *alg)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    int type;
 | 
					    int type;
 | 
				
			||||||
    struct mac_data *mdat;
 | 
					    struct mac_data *mdat;
 | 
				
			||||||
    if (strcmp(alg, "HMAC") == 0)
 | 
					    if (strcmp(alg, "HMAC") == 0) {
 | 
				
			||||||
        type = EVP_PKEY_HMAC;
 | 
					        type = EVP_PKEY_HMAC;
 | 
				
			||||||
    else if (strcmp(alg, "CMAC") == 0)
 | 
					    } else if (strcmp(alg, "CMAC") == 0) {
 | 
				
			||||||
 | 
					#ifndef OPENSSL_NO_CMAC
 | 
				
			||||||
        type = EVP_PKEY_CMAC;
 | 
					        type = EVP_PKEY_CMAC;
 | 
				
			||||||
    else
 | 
					#else
 | 
				
			||||||
 | 
					        t->skip = 1;
 | 
				
			||||||
 | 
					        return 1;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					    } else
 | 
				
			||||||
        return 0;
 | 
					        return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    mdat = OPENSSL_malloc(sizeof(*mdat));
 | 
					    mdat = OPENSSL_malloc(sizeof(*mdat));
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user