if (!EVP_PKEY_copy_parameters(pkpeer, pk))
goto err;
} else {
- /* TODO(3.0): Should the get0_libctx/propq calls actually be public API? */
pkpeer = pkey_type2param(atype, aval,
- evp_pkey_ctx_get0_libctx(pctx),
- evp_pkey_ctx_get0_propq(pctx));
+ EVP_PKEY_CTX_get0_libctx(pctx),
+ EVP_PKEY_CTX_get0_propq(pctx));
if (pkpeer == NULL)
goto err;
}
return ret;
}
-OPENSSL_CTX *evp_pkey_ctx_get0_libctx(EVP_PKEY_CTX *ctx)
+OPENSSL_CTX *EVP_PKEY_CTX_get0_libctx(EVP_PKEY_CTX *ctx)
{
return ctx->libctx;
}
-const char *evp_pkey_ctx_get0_propq(EVP_PKEY_CTX *ctx)
+const char *EVP_PKEY_CTX_get0_propq(EVP_PKEY_CTX *ctx)
{
return ctx->propquery;
}
--- /dev/null
+=pod
+
+=head1 NAME
+
+EVP_PKEY_CTX_get0_libctx,
+EVP_PKEY_CTX_get0_propq
+- functions for getting OPENSSL_CTX and property query data from an EVP_PKEY_CTX
+
+=head1 SYNOPSIS
+
+ #include <openssl/evp.h>
+
+ OPENSSL_CTX *EVP_PKEY_CTX_get0_libctx(EVP_PKEY_CTX *ctx);
+ const char *EVP_PKEY_CTX_get0_propq(EVP_PKEY_CTX *ctx);
+
+=head1 DESCRIPTION
+
+The EVP_PKEY_CTX_get0_libctx() and EVP_PKEY_CTX_get0_propq() functions obtain
+the OPENSSL_CTX and property query string values respectively that were
+associated with the EVP_PKEY_CTX when it was constructed.
+
+=head1 RETURN VALUES
+
+EVP_PKEY_CTX_get0_libctx() and EVP_PKEY_CTX_get0_propq() functions return the
+OPENSSL_CTX and property query string associated with the EVP_PKEY_CTX or NULL
+if they are not set. The returned values should not be freed by the caller.
+
+=head1 SEE ALSO
+
+L<EVP_PKEY_CTX_new(3)>
+
+=head1 HISTORY
+
+All functions were added in OpenSSL 3.0.
+
+=head1 COPYRIGHT
+
+Copyright 2020 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
+L<https://www.openssl.org/source/license.html>.
+
+=cut
int evp_pkey_ctx_use_cached_data(EVP_PKEY_CTX *ctx);
#endif /* !defined(FIPS_MODULE) */
-OPENSSL_CTX *evp_pkey_ctx_get0_libctx(EVP_PKEY_CTX *ctx);
-const char *evp_pkey_ctx_get0_propq(EVP_PKEY_CTX *ctx);
void evp_method_store_flush(OPENSSL_CTX *libctx);
int evp_set_default_properties_int(OPENSSL_CTX *libctx, const char *propq,
int loadconfig);
int EVP_PKEY_CTX_set_group_name(EVP_PKEY_CTX *ctx, const char *name);
int EVP_PKEY_CTX_get_group_name(EVP_PKEY_CTX *ctx, char *name, size_t namelen);
+OPENSSL_CTX *EVP_PKEY_CTX_get0_libctx(EVP_PKEY_CTX *ctx);
+const char *EVP_PKEY_CTX_get0_propq(EVP_PKEY_CTX *ctx);
+
# ifdef __cplusplus
}
# endif
PKCS7_get_octet_string ? 3_0_0 EXIST::FUNCTION:
OSSL_DECODER_from_data ? 3_0_0 EXIST::FUNCTION:
OSSL_ENCODER_to_data ? 3_0_0 EXIST::FUNCTION:
+EVP_PKEY_CTX_get0_libctx ? 3_0_0 EXIST::FUNCTION:
+EVP_PKEY_CTX_get0_propq ? 3_0_0 EXIST::FUNCTION: