summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl
diff options
context:
space:
mode:
authorVladislav Grishenko <themiron@mail.ru>2017-11-29 00:40:15 +0500
committerVladislav Grishenko <themiron@mail.ru>2017-12-30 22:48:59 +0500
commit6eb32046351a0efd702db74c7e8521c4fcdb7bee (patch)
tree9c6d46625ace0845ce97e153990f684e572859d7 /accel-pppd/ctrl
parent0da2a12029cc8c8dd54ab7c2dc8ea468b985e919 (diff)
downloadaccel-ppp-6eb32046351a0efd702db74c7e8521c4fcdb7bee.tar.gz
accel-ppp-6eb32046351a0efd702db74c7e8521c4fcdb7bee.zip
sstp: allow colons in cert-hash-* hex values
Simplify copy-pasting from openssl x509 -fingerprint output: Examples: openssl x509 -in cert.pem -noout -fingerprint -sha1 openssl x509 -in cert.pem -noout -fingerprint -sha256
Diffstat (limited to 'accel-pppd/ctrl')
-rw-r--r--accel-pppd/ctrl/sstp/sstp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/sstp/sstp.c b/accel-pppd/ctrl/sstp/sstp.c
index 209de22a..9ecd1f6e 100644
--- a/accel-pppd/ctrl/sstp/sstp.c
+++ b/accel-pppd/ctrl/sstp/sstp.c
@@ -1900,6 +1900,8 @@ static int hex2bin(const char *src, uint8_t *dst, size_t size)
dst[n] = strtoul(buf, &err, 16);
if (err == buf || *err)
break;
+ if (*src == ':')
+ src++;
}
return n;
}