2 * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
3 * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
5 * Licensed under the Apache License 2.0 (the "License"). You may not use
6 * this file except in compliance with the License. You can obtain a copy
7 * in the file LICENSE in the source distribution or at
8 * https://www.openssl.org/source/license.html
11 #include <openssl/params.h>
12 #include <openssl/ossl_typ.h>
14 #define OSSL_PARAM_BLD_MAX 10
26 * These fields are never directly addressed, but their sizes are
27 * imporant so that all native types can be copied here without overrun.
39 OSSL_PARAM_BLD_DEF params
[OSSL_PARAM_BLD_MAX
];
42 void ossl_param_bld_init(OSSL_PARAM_BLD
*bld
);
43 OSSL_PARAM
*ossl_param_bld_to_param(OSSL_PARAM_BLD
*bld
);
44 void ossl_param_bld_free(OSSL_PARAM
*params
);
45 OSSL_PARAM
*ossl_param_bld_to_param_ex(OSSL_PARAM_BLD
*bld
,
46 OSSL_PARAM
*params
, size_t param_n
,
47 void *data
, size_t data_n
,
48 void *secure
, size_t secure_n
);
50 int ossl_param_bld_push_int(OSSL_PARAM_BLD
*bld
, const char *key
, int val
);
51 int ossl_param_bld_push_uint(OSSL_PARAM_BLD
*bld
, const char *key
,
53 int ossl_param_bld_push_long(OSSL_PARAM_BLD
*bld
, const char *key
,
55 int ossl_param_bld_push_ulong(OSSL_PARAM_BLD
*bld
, const char *key
,
56 unsigned long int val
);
57 int ossl_param_bld_push_int32(OSSL_PARAM_BLD
*bld
, const char *key
,
59 int ossl_param_bld_push_uint32(OSSL_PARAM_BLD
*bld
, const char *key
,
61 int ossl_param_bld_push_int64(OSSL_PARAM_BLD
*bld
, const char *key
,
63 int ossl_param_bld_push_uint64(OSSL_PARAM_BLD
*bld
, const char *key
,
65 int ossl_param_bld_push_size_t(OSSL_PARAM_BLD
*bld
, const char *key
,
67 int ossl_param_bld_push_double(OSSL_PARAM_BLD
*bld
, const char *key
,
69 int ossl_param_bld_push_BN(OSSL_PARAM_BLD
*bld
, const char *key
,
71 int ossl_param_bld_push_utf8_string(OSSL_PARAM_BLD
*bld
, const char *key
,
72 const char *buf
, size_t bsize
);
73 int ossl_param_bld_push_utf8_ptr(OSSL_PARAM_BLD
*bld
, const char *key
,
74 char *buf
, size_t bsize
);
75 int ossl_param_bld_push_octet_string(OSSL_PARAM_BLD
*bld
, const char *key
,
76 const void *buf
, size_t bsize
);
77 int ossl_param_bld_push_octet_ptr(OSSL_PARAM_BLD
*bld
, const char *key
,
78 void *buf
, size_t bsize
);