From: Hansaem Wi <[email protected]>

crypto_pem_decode() decodes the tls-crypt-v2 client and server keys
and the auth-token key, and frees the decoded key bytes it got from
PEM_read_bio() with OPENSSL_free(). Clear them with OPENSSL_cleanse()
first. OPENSSL_clear_free() would do both in one call, but LibreSSL
does not provide it.

Assisted-by: Claude Code:claude-opus-5-5
Change-Id: I6b42785de99ee1e6b555d8c5e61ebe2ae784510e
Signed-off-by: Hansaem Wi <[email protected]>
Acked-by: Steffan Karger <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2077
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2077
This mail reflects revision 2 of this Change.

Acked-by according to Gerrit (reflected above):
Steffan Karger <[email protected]>

        
diff --git a/src/openvpn/crypto_openssl.c b/src/openvpn/crypto_openssl.c
index e6abd8f..3c708c2 100644
--- a/src/openvpn/crypto_openssl.c
+++ b/src/openvpn/crypto_openssl.c
@@ -528,6 +528,7 @@
 cleanup:
     OPENSSL_free(name_read);
     OPENSSL_free(header_read);
+    OPENSSL_cleanse(data_read, data_read_len);
     OPENSSL_free(data_read);
     if (!BIO_free(bio))
     {


_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to