AES for SPARC T4: add XTS, reorder subroutines to improve TLB locality.
[openssl.git] / crypto / evp / pmeth_gn.c
index 17e0d5473a561545e8bdf493b35a3f713eac725e..4651c8137022467cab6412cbec4e3bfee203321b 100644 (file)
@@ -1,5 +1,5 @@
 /* pmeth_gn.c */
-/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
+/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
  * project 2006.
  */
 /* ====================================================================
@@ -61,6 +61,7 @@
 #include "cryptlib.h"
 #include <openssl/objects.h>
 #include <openssl/evp.h>
+#include <openssl/bn.h>
 #include "evp_locl.h"
 
 int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx)
@@ -198,7 +199,7 @@ int EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx)
        }
 
 EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e,
-                               unsigned char *key, int keylen)
+                               const unsigned char *key, int keylen)
        {
        EVP_PKEY_CTX *mac_ctx = NULL;
        EVP_PKEY *mac_key = NULL;
@@ -208,7 +209,8 @@ EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e,
        if (EVP_PKEY_keygen_init(mac_ctx) <= 0)
                goto merr;
        if (EVP_PKEY_CTX_ctrl(mac_ctx, -1, EVP_PKEY_OP_KEYGEN,
-                               EVP_PKEY_CTRL_SET_MAC_KEY, keylen, key) <= 0)
+                               EVP_PKEY_CTRL_SET_MAC_KEY,
+                               keylen, (void *)key) <= 0)
                goto merr;
        if (EVP_PKEY_keygen(mac_ctx, &mac_key) <= 0)
                goto merr;