Read an octet-string parameter from a key by OSSL_PKEY_PARAM name.
Declared in <openssl/evp.h>
int
EVP_PKEY_get_octet_string_param(
EVP_PKEY const* pkey,
char const* key_name,
unsigned char* buf,
size_t max_buf_sz,
size_t* out_sz);
1 on success, or 0 on error.
| Name | Description |
|---|---|
| pkey | Key to query. |
| key_name | Parameter name (for example OSSL_PKEY_PARAM_PUB_KEY). |
| buf | Destination buffer, or NULL to only query the required size. |
| max_buf_sz | Capacity of buf in bytes. |
| out_sz | Receives the parameter length in bytes. |