1 // Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
22 #include "ssl_types.h"
25 * @brief create a private key object according to input private key
27 * @param ipk - input private key point
29 * @return new private key object point
31 EVP_PKEY* __EVP_PKEY_new(EVP_PKEY *ipk);
34 * @brief create a private key object
38 * @return private key object point
40 EVP_PKEY* EVP_PKEY_new(void);
43 * @brief load a character key context into system context. If '*a' is pointed to the
44 * private key, then load key into it. Or create a new private key object
46 * @param type - private key type
47 * @param a - a point pointed to a private key point
48 * @param pp - a point pointed to the key context memory point
49 * @param length - key bytes
51 * @return private key object point
53 EVP_PKEY* d2i_PrivateKey(int type,
55 const unsigned char **pp,
59 * @brief free a private key object
61 * @param pkey - private key object point
65 void EVP_PKEY_free(EVP_PKEY *x);
68 * @brief load private key into the SSL
70 * @param type - private key type
71 * @param ssl - SSL point
72 * @param len - data bytes
73 * @param d - data point
79 int SSL_use_PrivateKey_ASN1(int type, SSL *ssl, const unsigned char *d, long len);