Make sure we only run the self tests once
[oweals/openssl.git] / include / internal / param_build.h
index 762d7b11c9c8c7b145a8971e0c82c101ff2ed0f7..a8116e35cdbd5821ed912e4dda43f6ccbe373ed5 100644 (file)
@@ -9,9 +9,9 @@
  */
 
 #include <openssl/params.h>
-#include <openssl/ossl_typ.h>
+#include <openssl/types.h>
 
-#define OSSL_PARAM_BLD_MAX 10
+#define OSSL_PARAM_BLD_MAX 25
 
 typedef struct {
     const char *key;
@@ -20,7 +20,7 @@ typedef struct {
     size_t size;
     size_t alloc_blocks;
     const BIGNUM *bn;
-    void *string;
+    const void *string;
     union {
         /*
          * These fields are never directly addressed, but their sizes are
@@ -40,7 +40,8 @@ typedef struct {
 } OSSL_PARAM_BLD;
 
 void ossl_param_bld_init(OSSL_PARAM_BLD *bld);
-OSSL_PARAM *ossl_param_bld_to_param(OSSL_PARAM_BLD *bld, void **secure);
+OSSL_PARAM *ossl_param_bld_to_param(OSSL_PARAM_BLD *bld);
+void ossl_param_bld_free(OSSL_PARAM *params);
 OSSL_PARAM *ossl_param_bld_to_param_ex(OSSL_PARAM_BLD *bld,
                                        OSSL_PARAM *params, size_t param_n,
                                        void *data, size_t data_n,
@@ -68,10 +69,10 @@ int ossl_param_bld_push_double(OSSL_PARAM_BLD *bld, const char *key,
 int ossl_param_bld_push_BN(OSSL_PARAM_BLD *bld, const char *key,
                            const BIGNUM *bn);
 int ossl_param_bld_push_utf8_string(OSSL_PARAM_BLD *bld, const char *key,
-                                    char *buf, size_t bsize);
+                                    const char *buf, size_t bsize);
 int ossl_param_bld_push_utf8_ptr(OSSL_PARAM_BLD *bld, const char *key,
                                  char *buf, size_t bsize);
 int ossl_param_bld_push_octet_string(OSSL_PARAM_BLD *bld, const char *key,
-                                     void *buf, size_t bsize);
+                                     const void *buf, size_t bsize);
 int ossl_param_bld_push_octet_ptr(OSSL_PARAM_BLD *bld, const char *key,
                                   void *buf, size_t bsize);