diff options
author | Richard Levitte <levitte@openssl.org> | 2020-08-02 14:29:33 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-08-24 10:02:26 +0200 |
commit | 4fd397821139723fd4e51a03e92df33e9a9fadcc (patch) | |
tree | f4f63e97361f8250afcdcca54d7d76bde1fbfeea /doc | |
parent | OSSL_PARAM: Add string pointer getters (diff) | |
download | openssl-4fd397821139723fd4e51a03e92df33e9a9fadcc.tar.xz openssl-4fd397821139723fd4e51a03e92df33e9a9fadcc.zip |
DECODER: Add function to set an OSSL_PASSPHRASE_CALLBACK type callback
This makes it possible to use OSSL_DECODER in functions that are passed
a OSSL_PASSPHRASE_CALLBACK already.
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12512)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/man3/OSSL_DECODER_CTX_new_by_EVP_PKEY.pod | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/doc/man3/OSSL_DECODER_CTX_new_by_EVP_PKEY.pod b/doc/man3/OSSL_DECODER_CTX_new_by_EVP_PKEY.pod index 4486e6b001..620688e322 100644 --- a/doc/man3/OSSL_DECODER_CTX_new_by_EVP_PKEY.pod +++ b/doc/man3/OSSL_DECODER_CTX_new_by_EVP_PKEY.pod @@ -5,7 +5,8 @@ OSSL_DECODER_CTX_new_by_EVP_PKEY, OSSL_DECODER_CTX_set_passphrase, OSSL_DECODER_CTX_set_pem_password_cb, -OSSL_DECODER_CTX_set_passphrase_ui +OSSL_DECODER_CTX_set_passphrase_ui, +OSSL_DECODER_CTX_set_passphrase_cb - Decoder routines to decode EVP_PKEYs =head1 SYNOPSIS @@ -25,6 +26,9 @@ OSSL_DECODER_CTX_set_passphrase_ui int OSSL_DECODER_CTX_set_passphrase_ui(OSSL_DECODER_CTX *ctx, const UI_METHOD *ui_method, void *ui_data); + int OSSL_DECODER_CTX_set_passphrase_cb(OSSL_DECODER_CTX *ctx, + OSSL_PASSPHRASE_CALLBACK *cb, + void *cbarg); =head1 DESCRIPTION @@ -55,29 +59,26 @@ pass phrase to use when decrypting the encoded private key. Alternatively, a pass phrase callback may be specified with the following functions. -OSSL_DECODER_CTX_set_pem_password_cb() and -OSSL_DECODER_CTX_set_passphrase_ui() set up a callback method that +OSSL_DECODER_CTX_set_pem_password_cb(), +OSSL_DECODER_CTX_set_passphrase_ui() and +OSSL_DECODER_CTX_set_passphrase_cb() set up a callback method that the implementation can use to prompt for a pass phrase, giving the caller the choice of prefered pass phrase callback form. These are called indirectly, through an internal B<OSSL_PASSPHRASE_CALLBACK> function. -The internal B<OSSL_PASSPHRASE_CALLBACK> function caches the pass phrase, to -be re-used in all decodings that are performed in the same -decoding run +The internal B<OSSL_PASSPHRASE_CALLBACK> function caches the pass phrase, +to be re-used in all decodings that are performed in the same decoding run (for example, within one L<OSSL_DECODER_from_bio(3)> call). -=for comment the name OSSL_DECODER_CTX_set_pem_password_cb() leaves -open the future possibility of having a function where the caller can set a -B<OSSL_PASSPHRASE_CALLBACK> method as another option. - =head1 RETURN VALUES OSSL_DECODER_CTX_new_by_EVP_PKEY() returns a pointer to a B<OSSL_DECODER_CTX>, or NULL if it couldn't be created. OSSL_DECODER_CTX_set_passphrase(), -OSSL_DECODER_CTX_set_pem_password_cb() and -OSSL_DECODER_CTX_set_passphrase_ui() +OSSL_DECODER_CTX_set_pem_password_cb(), +OSSL_DECODER_CTX_set_passphrase_ui() and +OSSL_DECODER_CTX_set_passphrase_cb() all return 1 on success, or 0 on failure. =head1 NOTES |