Ai
8 Star 77 Fork 142

OpenHarmony/third_party_openssl
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
EVP_PKEY_todata.pod 1.98 KB
一键复制 编辑 原始数据 按行查看 历史
code4lala 提交于 2023-10-16 10:12 +08:00 . openssl-3.0.9.tar.gz

NAME

EVP_PKEY_todata, EVP_PKEY_export - functions to return keys as an array of key parameters

SYNOPSIS

#include <openssl/evp.h>

int EVP_PKEY_todata(const EVP_PKEY *pkey, int selection, OSSL_PARAM **params);
int EVP_PKEY_export(const EVP_PKEY *pkey, int selection,
                    OSSL_CALLBACK *export_cb, void *export_cbarg);

DESCRIPTION

The functions described here are used to extract EVP_PKEY key values as an array of OSSL_PARAM(3).

EVP_PKEY_todata() extracts values from a key pkey using the selection. selection is described in "Selections" in EVP_PKEY_fromdata(3). OSSL_PARAM_free(3) should be used to free the returned parameters in *params.

EVP_PKEY_export() is similiar to EVP_PKEY_todata() but uses a callback export_cb that gets passed the value of export_cbarg. See openssl-core.h(7) for more information about the callback. Note that the OSSL_PARAM(3) array that is passed to the callback is not persistent after the callback returns. The user must preserve the items of interest, or use EVP_PKEY_todata() if persistence is required.

NOTES

These functions only work with key management methods coming from a provider. This is the mirror function to EVP_PKEY_fromdata(3).

RETURN VALUES

EVP_PKEY_todata() and EVP_PKEY_export() return 1 for success and 0 for failure.

SEE ALSO

OSSL_PARAM(3), openssl-core.h(7), EVP_PKEY_fromdata(3), EVP_PKEY-RSA(7), EVP_PKEY-DSA(7), EVP_PKEY-DH(7), EVP_PKEY-EC(7), EVP_PKEY-ED448(7), EVP_PKEY-X25519(7), EVP_PKEY-X448(7), EVP_PKEY-ED25519(7)

HISTORY

These functions were added in OpenSSL 3.0.

COPYRIGHT

Copyright 2021 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 https://www.openssl.org/source/license.html.

Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openharmony/third_party_openssl.git
git@gitee.com:openharmony/third_party_openssl.git
openharmony
third_party_openssl
third_party_openssl
master

搜索帮助