/*
- * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
const char *value, size_t value_n,
/* Output parameters */
const OSSL_PARAM **paramdef, int *ishex,
- size_t *buf_n, BIGNUM **tmpbn)
+ size_t *buf_n, BIGNUM **tmpbn, int *found)
{
const OSSL_PARAM *p;
key += 3;
p = *paramdef = OSSL_PARAM_locate_const(paramdefs, key);
+ if (found != NULL)
+ *found = p != NULL;
if (p == NULL)
return 0;
*to = *paramdef;
to->data = buf;
to->data_size = buf_n;
- to->return_size = 0;
+ to->return_size = OSSL_PARAM_UNMODIFIED;
return 1;
}
int OSSL_PARAM_allocate_from_text(OSSL_PARAM *to,
const OSSL_PARAM *paramdefs,
const char *key, const char *value,
- size_t value_n)
+ size_t value_n, int *found)
{
const OSSL_PARAM *paramdef = NULL;
int ishex = 0;
return 0;
if (!prepare_from_text(paramdefs, key, value, value_n,
- ¶mdef, &ishex, &buf_n, &tmpbn))
+ ¶mdef, &ishex, &buf_n, &tmpbn, found))
return 0;
if ((buf = OPENSSL_zalloc(buf_n > 0 ? buf_n : 1)) == NULL) {