about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2015-10-08 09:26:03 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2015-10-08 09:26:03 -0400
commitf388b2a11503c04e1b49047fd6e35d0f49e00b0b (patch)
tree52f48e4796fc36124255d231d945a08d542a9d80 /WWW/Library/Implementation
parent9d9f993bb460439786136fab2ac9465e72fc31da (diff)
downloadlynx-snapshots-f388b2a11503c04e1b49047fd6e35d0f49e00b0b.tar.gz
snapshot of project "lynx", label v2-8-9dev_6h
Diffstat (limited to 'WWW/Library/Implementation')
-rw-r--r--WWW/Library/Implementation/HTTP.c27
-rw-r--r--WWW/Library/Implementation/tidy_tls.h7
2 files changed, 32 insertions, 2 deletions
diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c
index 86846add..6dc6adf8 100644
--- a/WWW/Library/Implementation/HTTP.c
+++ b/WWW/Library/Implementation/HTTP.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTTP.c,v 1.142 2015/05/06 23:34:07 tom Exp $
+ * $LynxId: HTTP.c,v 1.143 2015/10/08 08:52:00 Simon.Kainz Exp $
  *
  * HyperText Tranfer Protocol	- Client implementation		HTTP.c
  * ==========================
@@ -162,6 +162,9 @@ SSL *HTGetSSLHandle(void)
 {
 #ifdef USE_GNUTLS_INCL
     static char *certfile = NULL;
+    static char *client_keyfile = NULL;
+    static char *client_certfile = NULL;
+
 #endif
 
     if (ssl_ctx == NULL) {
@@ -204,6 +207,7 @@ SSL *HTGetSSLHandle(void)
 	}
 #endif
 #ifdef USE_GNUTLS_INCL
+
 	if ((certfile = LYGetEnv("SSL_CERT_FILE")) != NULL) {
 	    CTRACE((tfp,
 		    "HTGetSSLHandle: certfile is set to %s by SSL_CERT_FILE\n",
@@ -225,10 +229,31 @@ SSL *HTGetSSLHandle(void)
 	}
 #endif
 	atexit(free_ssl_ctx);
+
     }
 #ifdef USE_GNUTLS_INCL
+
+    if (non_empty(SSL_client_key_file)) {
+	client_keyfile = SSL_client_key_file;
+	CTRACE((tfp,
+		"HTGetSSLHandle: client key file is set to %s by config SSL_CLIENT_KEY_FILE\n",
+		client_keyfile));
+    }
+
+    if (non_empty(SSL_client_cert_file)) {
+	client_certfile = SSL_client_cert_file;
+	CTRACE((tfp,
+		"HTGetSSLHandle: client cert file is set to %s by config SSL_CLIENT_CERT_FILE\n",
+		client_certfile));
+    }
+
     ssl_ctx->certfile = certfile;
     ssl_ctx->certfile_type = GNUTLS_X509_FMT_PEM;
+    ssl_ctx->client_keyfile = client_keyfile;
+    ssl_ctx->client_keyfile_type = GNUTLS_X509_FMT_PEM;
+    ssl_ctx->client_certfile = client_certfile;
+    ssl_ctx->client_certfile_type = GNUTLS_X509_FMT_PEM;
+
 #endif
     ssl_okay = 0;
     return (SSL_new(ssl_ctx));
diff --git a/WWW/Library/Implementation/tidy_tls.h b/WWW/Library/Implementation/tidy_tls.h
index 631e8a2a..1674c81b 100644
--- a/WWW/Library/Implementation/tidy_tls.h
+++ b/WWW/Library/Implementation/tidy_tls.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: tidy_tls.h,v 1.6 2015/09/02 01:16:04 tom Exp $
+ * $LynxId: tidy_tls.h,v 1.7 2015/10/08 08:51:26 Simon.Kainz Exp $
  * Copyright 2008-2013,2015 Thomas E. Dickey
  */
 #ifndef TIDY_TLS_H
@@ -78,6 +78,11 @@ typedef struct _SSL_CTX {
     int (*verify_callback) (int, X509_STORE_CTX *);
     int verify_mode;
 
+    char *client_certfile;
+    int client_certfile_type;
+    char *client_keyfile;
+    int client_keyfile_type;
+
 } SSL_CTX;
 
 struct _SSL {
a title='author James Booth <boothj5@gmail.com> 2012-05-22 00:19:38 +0100 committer James Booth <boothj5@gmail.com> 2012-05-22 00:19:38 +0100 Added some code documentation, DESIGN' href='/danisanti/profani-tty/commit/DESIGN?id=95dbb68b388dc4cf13491b9e04b197b17144f745'>95dbb68b ^
1b717024 ^
95dbb68b ^






1b717024 ^
95dbb68b ^





1b717024 ^
95dbb68b ^



















1b717024 ^
95dbb68b ^

1b717024 ^
95dbb68b ^





1b717024 ^
95dbb68b ^










1b717024 ^
95dbb68b ^
1b717024 ^
95dbb68b ^















1b717024 ^
95dbb68b ^




1b717024 ^
95dbb68b ^








1b717024 ^
95dbb68b ^






1b717024 ^

95dbb68b ^








7e620763 ^

95dbb68b ^
1b717024 ^
7e620763 ^










2429d23f ^
7e620763 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183