1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
libwebsockets/lib/tls/mbedtls
Andy Green 6b3221ffc1 mbedtls: only free crt_parse when something came back
Mbedtls mbedtls_x509_crt_parse() returns 0 for success which is good.
But it has a complicated idea about what to return on fail... if it
couldn't make even one cert from the data, then it returns a negative
return indicating the parsing problem and there is nothing to free.

If it managed to parse at least one cert, instead it retuns a positive
number indicating the number of certs it didn't parse successfully,
and there is something to free.

Adapt the code to understand this quirk.
2020-07-09 15:30:34 +01:00
..
wrapper mbedtls: remove mbedtls_x509_crt_info reference 2020-03-31 11:36:47 +01:00
CMakeLists.txt windows: for data exports use explicit extern 2020-06-07 07:53:36 +01:00
lws-genaes.c cmakelist: Augean Stables refactor 2020-05-27 08:40:12 +01:00
lws-gencrypto.c private.h: rename to contain dir 2019-08-15 10:49:52 +01:00
lws-genec.c cleaning 2020-01-05 22:17:58 +00:00
lws-genhash.c mbedtls: support old 2.2-era version from xenial 2020-03-21 14:43:53 +00:00
lws-genrsa.c mbedtls: support old 2.2-era version from xenial 2020-03-21 14:43:53 +00:00
mbedtls-client.c tls: add read client .pem or .der from memory #1941 2020-06-06 13:09:31 +01:00
mbedtls-server.c esp32: shift to support latest esp-idf 2020-05-27 08:40:12 +01:00
mbedtls-ssl.c esp32: shift to support latest esp-idf 2020-05-27 08:40:12 +01:00
mbedtls-tls.c private.h: rename to contain dir 2019-08-15 10:49:52 +01:00
mbedtls-x509.c mbedtls: only free crt_parse when something came back 2020-07-09 15:30:34 +01:00
private-lib-tls-mbedtls.h esp32: shift to support latest esp-idf 2020-05-27 08:40:12 +01:00