Home | History | Annotate | Line # | Download | only in internal
      1  1.1  christos /*
      2  1.1  christos  * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
      3  1.1  christos  *
      4  1.1  christos  * Licensed under the Apache License 2.0 (the "License").  You may not use
      5  1.1  christos  * this file except in compliance with the License.  You can obtain a copy
      6  1.1  christos  * in the file LICENSE in the source distribution or at
      7  1.1  christos  * https://www.openssl.org/source/license.html
      8  1.1  christos  */
      9  1.1  christos 
     10  1.1  christos #ifndef OSSL_INTERNAL_PARAM_BUILD_SET_H
     11  1.1  christos # define OSSL_INTERNAL_PARAM_BUILD_SET_H
     12  1.1  christos # pragma once
     13  1.1  christos 
     14  1.1  christos # include <openssl/safestack.h>
     15  1.1  christos # include <openssl/param_build.h>
     16  1.1  christos # include "internal/cryptlib.h"
     17  1.1  christos 
     18  1.1  christos typedef union {
     19  1.1  christos     OSSL_UNION_ALIGN;
     20  1.1  christos } OSSL_PARAM_ALIGNED_BLOCK;
     21  1.1  christos 
     22  1.1  christos # define OSSL_PARAM_ALIGN_SIZE  sizeof(OSSL_PARAM_ALIGNED_BLOCK)
     23  1.1  christos 
     24  1.1  christos size_t ossl_param_bytes_to_blocks(size_t bytes);
     25  1.1  christos void ossl_param_set_secure_block(OSSL_PARAM *last, void *secure_buffer,
     26  1.1  christos                                  size_t secure_buffer_sz);
     27  1.1  christos 
     28  1.1  christos int ossl_param_build_set_int(OSSL_PARAM_BLD *bld, OSSL_PARAM *p,
     29  1.1  christos                              const char *key, int num);
     30  1.1  christos int ossl_param_build_set_long(OSSL_PARAM_BLD *bld, OSSL_PARAM *p,
     31  1.1  christos                               const char *key, long num);
     32  1.1  christos int ossl_param_build_set_utf8_string(OSSL_PARAM_BLD *bld, OSSL_PARAM *p,
     33  1.1  christos                                      const char *key, const char *buf);
     34  1.1  christos int ossl_param_build_set_octet_string(OSSL_PARAM_BLD *bld, OSSL_PARAM *p,
     35  1.1  christos                                       const char *key,
     36  1.1  christos                                       const unsigned char *data,
     37  1.1  christos                                       size_t data_len);
     38  1.1  christos int ossl_param_build_set_bn(OSSL_PARAM_BLD *bld, OSSL_PARAM *p,
     39  1.1  christos                             const char *key, const BIGNUM *bn);
     40  1.1  christos int ossl_param_build_set_bn_pad(OSSL_PARAM_BLD *bld, OSSL_PARAM *p,
     41  1.1  christos                                 const char *key, const BIGNUM *bn,  size_t sz);
     42  1.1  christos int ossl_param_build_set_multi_key_bn(OSSL_PARAM_BLD *bld, OSSL_PARAM *p,
     43  1.1  christos                                       const char *names[],
     44  1.1  christos                                       STACK_OF(BIGNUM_const) *stk);
     45  1.1  christos 
     46  1.1  christos #endif  /* OSSL_INTERNAL_PARAM_BUILD_SET_H */
     47