[rs-commit] r70 - /redwax-tool/trunk/redwax_openssl.c

rs-commit at redwax.eu rs-commit at redwax.eu
Wed Nov 24 18:07:12 CET 2021


Author: minfrin at redwax.eu
Date: Wed Nov 24 18:07:11 2021
New Revision: 70

Log:
Pass all cert data across when verifying.

Modified:
    redwax-tool/trunk/redwax_openssl.c

Modified: redwax-tool/trunk/redwax_openssl.c
==============================================================================
--- redwax-tool/trunk/redwax_openssl.c	(original)
+++ redwax-tool/trunk/redwax_openssl.c	Wed Nov 24 18:07:11 2021
@@ -1436,9 +1436,7 @@
                  redwax_certificate_t *ncert;
                  redwax_certificate_t tcert = { 0 };
 
-                 tcert.header = cert->header;
-                 tcert.der = cert->der;
-                 tcert.len = cert->len;
+                 memcpy(&tcert, cert, sizeof(redwax_certificate_t));
 
                  if (r->current && r->certs_out->nelts) {
 
@@ -1495,9 +1493,7 @@
 
                          ncert = apr_array_push(r->intermediates_out);
 
-                         ncert->header = chain->header;
-                         ncert->der = chain->der;
-                         ncert->len = chain->len;
+                         memcpy(ncert, chain, sizeof(redwax_certificate_t));
 
                          rt_run_search_key(r, chain);
                      }
@@ -1505,9 +1501,7 @@
 
                          ncert = apr_array_push(r->trusted_out);
 
-                         ncert->header = chain->header;
-                         ncert->der = chain->der;
-                         ncert->len = chain->len;
+                         memcpy(ncert, chain, sizeof(redwax_certificate_t));
 
                          rt_run_search_key(r, chain);
                      }



More information about the rs-commit mailing list