From 6eb32046351a0efd702db74c7e8521c4fcdb7bee Mon Sep 17 00:00:00 2001 From: Vladislav Grishenko Date: Wed, 29 Nov 2017 00:40:15 +0500 Subject: 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 --- accel-pppd/ctrl/sstp/sstp.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'accel-pppd/ctrl') diff --git a/accel-pppd/ctrl/sstp/sstp.c b/accel-pppd/ctrl/sstp/sstp.c index 209de22..9ecd1f6 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; } -- cgit v1.2.3