diff options
Diffstat (limited to 'src/gmrequest.c')
-rw-r--r-- | src/gmrequest.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gmrequest.c b/src/gmrequest.c index 6ea4aa50..c231e1f3 100644 --- a/src/gmrequest.c +++ b/src/gmrequest.c | |||
@@ -199,6 +199,17 @@ static void checkServerCertificate_GmRequest_(iGmRequest *d) { | |||
199 | if (!isExpired_TlsCertificate(cert)) { | 199 | if (!isExpired_TlsCertificate(cert)) { |
200 | d->resp.certFlags |= timeVerified_GmCertFlag; | 200 | d->resp.certFlags |= timeVerified_GmCertFlag; |
201 | } | 201 | } |
202 | /* TODO: Check for IP too (see below), because it may be specified in the SAN. */ | ||
203 | #if 0 | ||
204 | iString *ip = toStringFlags_Address(address_TlsRequest(d->req), noPort_SocketStringFlag, 0); | ||
205 | if (verifyIp_TlsCertificate(cert, ip)) { | ||
206 | printf("[GmRequest] IP address %s matches!\n", cstr_String(ip)); | ||
207 | } | ||
208 | else { | ||
209 | printf("[GmRequest] IP address %s not matched\n", cstr_String(ip)); | ||
210 | } | ||
211 | delete_String(ip); | ||
212 | #endif | ||
202 | if (verifyDomain_TlsCertificate(cert, domain)) { | 213 | if (verifyDomain_TlsCertificate(cert, domain)) { |
203 | d->resp.certFlags |= domainVerified_GmCertFlag; | 214 | d->resp.certFlags |= domainVerified_GmCertFlag; |
204 | } | 215 | } |
@@ -303,6 +314,7 @@ static const iBlock *aboutPageSource_(iRangecc path) { | |||
303 | static const iBlock *replaceVariables_(const iBlock *block) { | 314 | static const iBlock *replaceVariables_(const iBlock *block) { |
304 | iRegExp *var = new_RegExp("\\$\\{([^}]+)\\}", 0); | 315 | iRegExp *var = new_RegExp("\\$\\{([^}]+)\\}", 0); |
305 | iRegExpMatch m; | 316 | iRegExpMatch m; |
317 | init_RegExpMatch(&m); | ||
306 | if (matchRange_RegExp(var, range_Block(block), &m)) { | 318 | if (matchRange_RegExp(var, range_Block(block), &m)) { |
307 | iBlock *replaced = collect_Block(copy_Block(block)); | 319 | iBlock *replaced = collect_Block(copy_Block(block)); |
308 | do { | 320 | do { |