mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
pem_to_der: fix binary mode length handling
This commit is contained in:
parent
b65b8f4c6f
commit
10315893f7
1 changed files with 2 additions and 2 deletions
|
@ -214,8 +214,8 @@ lws_tls_alloc_pem_to_der_file(struct lws_context *context, const char *filename,
|
|||
if (filename)
|
||||
*q = '\0';
|
||||
|
||||
*amount = lws_b64_decode_string((char *)p, (char *)pem,
|
||||
(int)(long long)len);
|
||||
*amount = lws_b64_decode_string_len((char *)p, lws_ptr_diff(q, p),
|
||||
(char *)pem, (int)(long long)len);
|
||||
*buf = (uint8_t *)pem;
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue