logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

EVP_CIPHER_CTX_get_algor, EVP_CIPHER_CTX_get_algor_params, EVP_CIPHER_CTX_set_algor_params,

Description

       In the description here and the "SYNOPSIS" above, TYPE is used as a placeholder for any EVP operation
       type.

       EVP_TYPE_CTX_get_algor() attempts to retrieve a complete AlgorithmIdentifier from the EVP_TYPE
       implementation, and populates *alg with it.  If alg is NULL, calling this function will serve to see if
       calling this function is supported at all by the EVP_TYPE implementation.  If *alg is NULL, space will be
       allocated automatically, and assigned to *alg.

       EVP_TYPE_CTX_get_algor_params() attempts to retrieve the parameters part of an AlgorithmIdentifier from
       the EVP_TYPE implementation, and populates alg-parameters> with it.  If alg is NULL, calling this
       function will serve to see if calling this function is supported at all by the EVP_TYPE implementation.
       If alg->parameters is NULL, space will be allocated automatically, and assigned to  alg->parameters.  If
       alg->parameters is not NULL, its previous contents will be overwritten with the retrieved
       AlgorithmIdentifier parameters.  Beware!

       EVP_TYPE_CTX_set_algor_params() attempts to pass alg->parameters to the EVP_TYPE implementation.  If alg
       is NULL, calling this function will serve to see if calling this function is supported at all by the
       EVP_TYPE implementation.

History

       These functions were added in OpenSSL 3.4.

Name

       EVP_CIPHER_CTX_get_algor, EVP_CIPHER_CTX_get_algor_params, EVP_CIPHER_CTX_set_algor_params,
       EVP_PKEY_CTX_get_algor, EVP_PKEY_CTX_get_algor_params, EVP_PKEY_CTX_set_algor_params - pass
       AlgorithmIdentifier and its params to/from algorithm implementations

Return Values

       All functions return 1 for success, and 0 or a negative number if an error occurs.  In particular, -2 is
       returned when the function isn't supported by the EVP_TYPE implementation.

Synopsis

        int EVP_TYPE_CTX_get_algor(EVP_TYPE_CTX *ctx, X509_ALGOR **alg);
        int EVP_TYPE_CTX_get_algor_params(EVP_TYPE_CTX *ctx, X509_ALGOR *alg);
        int EVP_TYPE_CTX_set_algor_params(EVP_TYPE_CTX *ctx, const X509_ALGOR *alg);

See Also