diff options
author | Richard Levitte <levitte@openssl.org> | 2020-10-26 13:06:01 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-11-11 11:42:06 +0100 |
commit | ebfdb63d96496274106b4192fda6039cbb272bae (patch) | |
tree | 783610da2aeff10d1c1944e077600c153e7125e0 /include | |
parent | f7626d0bfab35acd89c2c6542fc6504954191a14 (diff) |
DECODER: Add support for specifying the outermost input structure
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13248)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/core_names.h | 5 | ||||
-rw-r--r-- | include/openssl/decoder.h | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/include/openssl/core_names.h b/include/openssl/core_names.h index 43be4ae145..11a4168cc1 100644 --- a/include/openssl/core_names.h +++ b/include/openssl/core_names.h @@ -457,8 +457,9 @@ extern "C" { #define OSSL_ENCODER_PARAM_INPUT_TYPE "input-type" #define OSSL_ENCODER_PARAM_OUTPUT_TYPE "output-type" -#define OSSL_DECODER_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES -#define OSSL_DECODER_PARAM_INPUT_TYPE "input-type" +#define OSSL_DECODER_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES +#define OSSL_DECODER_PARAM_INPUT_TYPE "input-type" +#define OSSL_DECODER_PARAM_INPUT_STRUCTURE "input-structure" /* Passphrase callback parameters */ #define OSSL_PASSPHRASE_PARAM_INFO "info" diff --git a/include/openssl/decoder.h b/include/openssl/decoder.h index 1c6bc8e498..8b360e6198 100644 --- a/include/openssl/decoder.h +++ b/include/openssl/decoder.h @@ -68,8 +68,11 @@ int OSSL_DECODER_CTX_set_passphrase_ui(OSSL_DECODER_CTX *ctx, * These will discover all provided methods */ +int OSSL_DECODER_CTX_set_selection(OSSL_DECODER_CTX *ctx, int selection); int OSSL_DECODER_CTX_set_input_type(OSSL_DECODER_CTX *ctx, const char *input_type); +int OSSL_DECODER_CTX_set_input_structure(OSSL_DECODER_CTX *ctx, + const char *input_structure); int OSSL_DECODER_CTX_add_decoder(OSSL_DECODER_CTX *ctx, OSSL_DECODER *decoder); int OSSL_DECODER_CTX_add_extra(OSSL_DECODER_CTX *ctx, OSSL_LIB_CTX *libctx, const char *propq); @@ -82,6 +85,9 @@ void * OSSL_DECODER_INSTANCE_get_decoder_ctx(OSSL_DECODER_INSTANCE *decoder_inst); const char * OSSL_DECODER_INSTANCE_get_input_type(OSSL_DECODER_INSTANCE *decoder_inst); +const char * +OSSL_DECODER_INSTANCE_get_input_structure(OSSL_DECODER_INSTANCE *decoder_inst, + int *was_set); typedef int OSSL_DECODER_CONSTRUCT(OSSL_DECODER_INSTANCE *decoder_inst, const OSSL_PARAM *params, |