Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 07e23d4e authored by deuce's avatar deuce

Strip leading zero bytes from public key values.

parent 734aa821
......@@ -134,6 +134,10 @@ static void js_simple_asn1(unsigned char *data, size_t len, JSContext *cx, JSObj
n = malloc(sz);
if (n == NULL)
return;
while(data[off] == 0) {
off++;
sz--;
}
memcpy(n, data+off, sz);
n64 = malloc(sz*4/3+3);
if (n64 == NULL) {
......@@ -161,6 +165,10 @@ static void js_simple_asn1(unsigned char *data, size_t len, JSContext *cx, JSObj
free(n64);
return;
}
while(data[off] == 0) {
off++;
sz--;
}
memcpy(e, data+off, sz);
e64 = malloc(sz*4/3+3);
if (e64 == NULL) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment