-/* $OpenBSD: p_lib.c,v 1.49 2023/12/25 21:55:31 tb Exp $ */
+/* $OpenBSD: p_lib.c,v 1.50 2023/12/25 22:41:50 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
return 1;
}
+int
+EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key)
+{
+ if (!EVP_PKEY_set_type(pkey, type))
+ return 0;
+
+ return (pkey->pkey.ptr = key) != NULL;
+}
+
EVP_PKEY *
EVP_PKEY_new_raw_private_key(int type, ENGINE *engine,
const unsigned char *private_key, size_t len)
return NULL;
}
-int
-EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key)
-{
- if (!EVP_PKEY_set_type(pkey, type))
- return 0;
- pkey->pkey.ptr = key;
- return (key != NULL);
-}
-
void *
EVP_PKEY_get0(const EVP_PKEY *pkey)
{