Add Curve OIDs from draft-josefsson-pkix-newcurves
[openssl.git] / crypto / cmac / cm_ameth.c
index 07853a63d367ec8e9e44863a76389dd46a0ac71e..d9a550e72b68243c5e2427c6dfc18c471cb503cc 100644 (file)
@@ -52,7 +52,7 @@
  */
 
 #include <stdio.h>
-#include "cryptlib.h"
+#include "internal/cryptlib.h"
 #include <openssl/evp.h>
 #include <openssl/cmac.h>
 #include "internal/asn1_int.h"
@@ -69,7 +69,7 @@ static int cmac_size(const EVP_PKEY *pkey)
 
 static void cmac_key_free(EVP_PKEY *pkey)
 {
-    CMAC_CTX *cmctx = (CMAC_CTX *)pkey->pkey.ptr;
+    CMAC_CTX *cmctx = EVP_PKEY_get0(pkey);
     CMAC_CTX_free(cmctx);
 }