Path: blob/main/crypto/openssl/include/internal/params.h
34879 views
/*1* Copyright 2023 The OpenSSL Project Authors. All Rights Reserved.2*3* Licensed under the Apache License 2.0 (the "License"). You may not use4* this file except in compliance with the License. You can obtain a copy5* in the file LICENSE in the source distribution or at6* https://www.openssl.org/source/license.html7*/89#include <stddef.h>10#include <openssl/params.h>1112/*13* Extract the parameter into an allocated buffer.14* Any existing allocation in *out is cleared and freed.15*16* Returns 1 on success, 0 on failure and -1 if there are no matching params.17*18* *out and *out_len are guaranteed to be untouched if this function19* doesn't return success.20*/21int ossl_param_get1_octet_string(const OSSL_PARAM *params, const char *name,22unsigned char **out, size_t *out_len);23/*24* Concatenate all of the matching params together.25* *out will point to an allocated buffer on successful return.26* Any existing allocation in *out is cleared and freed.27*28* Passing 0 for maxsize means unlimited size output.29*30* Returns 1 on success, 0 on failure and -1 if there are no matching params.31*32* *out and *out_len are guaranteed to be untouched if this function33* doesn't return success.34*/35int ossl_param_get1_concat_octet_string(const OSSL_PARAM *params, const char *name,36unsigned char **out, size_t *out_len,37size_t maxsize);383940