summaryrefslogtreecommitdiff
path: root/lib/gnutls_global.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gnutls_global.c')
-rw-r--r--lib/gnutls_global.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/gnutls_global.c b/lib/gnutls_global.c
index eafd29f460..5eb1e14df6 100644
--- a/lib/gnutls_global.c
+++ b/lib/gnutls_global.c
@@ -70,6 +70,7 @@ extern const ASN1_ARRAY_TYPE gnutls_asn1_tab[];
extern const ASN1_ARRAY_TYPE pkix_asn1_tab[];
void *_gnutls_file_mutex;
void *_gnutls_pkcs11_mutex;
+const char *_gnutls_keylogfile = NULL;
ASN1_TYPE _gnutls_pkix1_asn = ASN1_TYPE_EMPTY;
ASN1_TYPE _gnutls_gnutls_asn = ASN1_TYPE_EMPTY;
@@ -240,6 +241,10 @@ int gnutls_global_init(void)
_gnutls_switch_lib_state(LIB_STATE_INIT);
+ _gnutls_keylogfile = getenv("GNUTLS_KEYLOGFILE");
+ if (_gnutls_keylogfile == NULL)
+ _gnutls_keylogfile = getenv("SSLKEYLOGFILE");
+
e = getenv("GNUTLS_DEBUG_LEVEL");
if (e != NULL) {
level = atoi(e);