]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
bearssl: make it proper C89 compliant
authorDaniel Stenberg <daniel@haxx.se>
Wed, 21 Sep 2022 08:32:54 +0000 (10:32 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 23 Sep 2022 06:27:50 +0000 (08:27 +0200)
lib/vtls/bearssl.c

index 94db9cecacf430c09dffdfb84c4165038056b574..1221ce8c84d4359c01fdfe8050d02810fc07cbd0 100644 (file)
@@ -76,9 +76,9 @@ struct cafile_parser {
 #define CAFILE_SOURCE_PATH 1
 #define CAFILE_SOURCE_BLOB 2
 struct cafile_source {
-  const int type;
-  const char * const data;
-  const size_t len;
+  int type;
+  const char *data;
+  size_t len;
 };
 
 static void append_dn(void *ctx, const void *buf, size_t len)
@@ -618,11 +618,11 @@ static CURLcode bearssl_connect_step1(struct Curl_easy *data,
   }
 
   if(ca_info_blob) {
-    struct cafile_source source = {
-      CAFILE_SOURCE_BLOB,
-      ca_info_blob->data,
-      ca_info_blob->len,
-    };
+    struct cafile_source source;
+    source.type = CAFILE_SOURCE_BLOB;
+    source.data = ca_info_blob->data;
+    source.len = ca_info_blob->len;
+
     ret = load_cafile(&source, &backend->anchors, &backend->anchors_len);
     if(ret != CURLE_OK) {
       if(verifypeer) {
@@ -635,11 +635,11 @@ static CURLcode bearssl_connect_step1(struct Curl_easy *data,
   }
 
   if(ssl_cafile) {
-    struct cafile_source source = {
-      CAFILE_SOURCE_PATH,
-      ssl_cafile,
-      0,
-    };
+    struct cafile_source source;
+    source.type = CAFILE_SOURCE_PATH;
+    source.data = ssl_cafile;
+    source.len = 0;
+
     ret = load_cafile(&source, &backend->anchors, &backend->anchors_len);
     if(ret != CURLE_OK) {
       if(verifypeer) {