auth zone review fixes

git-svn-id: file:///svn/unbound/trunk@4534 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2018-02-13 14:09:57 +00:00
parent b32284af57
commit da06b1c76c
2 changed files with 7 additions and 3 deletions

View File

@ -82,6 +82,10 @@
#define AUTH_TRANSFER_TIMEOUT 10000 /* msec */
/* auth transfer max backoff for failed tranfers and probes */
#define AUTH_TRANSFER_MAX_BACKOFF 86400 /* sec */
/* auth http port number */
#define AUTH_HTTP_PORT 80
/* auth https port number */
#define AUTH_HTTPS_PORT 443
/** pick up nextprobe task to start waiting to perform transfer actions */
static void xfr_set_timeout(struct auth_xfer* xfr, struct module_env* env,
@ -5913,7 +5917,7 @@ parse_url(char* url, char** host, char** file, int* port, int* ssl)
* or http://127.0.0.1 (index.html)
* or https://[::1@1234]/a/b/c/d */
*ssl = 0;
*port = 80;
*port = AUTH_HTTP_PORT;
/* parse http:// or https:// */
if(strncmp(p, "http://", 7) == 0) {
@ -5921,7 +5925,7 @@ parse_url(char* url, char** host, char** file, int* port, int* ssl)
} else if(strncmp(p, "https://", 8) == 0) {
p += 8;
*ssl = 1;
*port = 443;
*port = AUTH_HTTPS_PORT;
}
/* parse hostname part */

View File

@ -981,7 +981,7 @@ log_cert(unsigned level, const char* str, X509* cert)
|X509_FLAG_NO_ISSUER|X509_FLAG_NO_VALIDITY
|X509_FLAG_NO_EXTENSIONS|X509_FLAG_NO_AUX
|X509_FLAG_NO_ATTRIBUTES));
BIO_write(bio, &nul, sizeof(nul));
BIO_write(bio, &nul, (int)sizeof(nul));
len = BIO_get_mem_data(bio, &pp);
if(len != 0 && pp) {
verbose(level, "%s: \n%s", str, pp);