Constify param builder string functions.
authorPauli <paul.dale@oracle.com>
Wed, 21 Aug 2019 05:28:52 +0000 (15:28 +1000)
committerPauli <paul.dale@oracle.com>
Wed, 21 Aug 2019 05:30:56 +0000 (15:30 +1000)
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9649)

crypto/param_build.c
doc/internal/man3/ossl_param_bld_init.pod
include/internal/param_build.h

index 4d28c87..db21821 100644 (file)
@@ -160,7 +160,7 @@ int ossl_param_bld_push_BN(OSSL_PARAM_BLD *bld, const char *key,
 }
 
 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)
 {
     OSSL_PARAM_BLD_DEF *pd;
 
@@ -198,7 +198,7 @@ int ossl_param_bld_push_utf8_ptr(OSSL_PARAM_BLD *bld, const char *key,
 }
 
 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)
 {
     OSSL_PARAM_BLD_DEF *pd;
 
index 2385ffc..4acd8eb 100644 (file)
@@ -36,11 +36,11 @@ ossl_param_bld_push_octet_ptr
                             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);
 
index e1235ee..83f8087 100644 (file)
@@ -69,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);