=pod =head1 NAME EVP_PKEY_set_type, EVP_PKEY_set_type_str, EVP_PKEY_set_type_by_keymgmt - functions to change the EVP_PKEY type =head1 SYNOPSIS #include int EVP_PKEY_set_type(EVP_PKEY *pkey, int type); int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len); int EVP_PKEY_set_type_by_keymgmt(EVP_PKEY *pkey, EVP_KEYMGMT *keymgmt); =head1 DESCRIPTION All the functions described here behave the same in so far that they clear all the previous key data and methods from I, and reset it to be of the type of key given by the different arguments. If I is NULL, these functions will still return the same return values as if it wasn't. EVP_PKEY_set_type() initialises I to contain an internal legacy key. When doing this, it finds a L corresponding to I, and associates I with the findings. It is an error if no L could be found for I. EVP_PKEY_set_type_str() initialises I to contain an internal legacy key. When doing this, it finds a L corresponding to I that has then length I, and associates I with the findings. It is an error if no L could be found for I. For both EVP_PKEY_set_type() and EVP_PKEY_set_type_str(), I gets a numeric type, which can be retrieved with L. This numeric type is taken from the L that was found, and is equal to or closely related to I in the case of EVP_PKEY_set_type(), or related to I in the case of EVP_PKEY_set_type_str(). EVP_PKEY_set_type_by_keymgmt() initialises I to contain an internal provider side key. When doing this, it associates I with I. For keys initialised like this, the numeric type retrieved with L will always be B. =head1 RETURN VALUES All functions described here return 1 if successful, or 0 on error. =head1 SEE ALSO L, L, L, L, L, L =head1 COPYRIGHT Copyright 2020 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at L. =cut