Skip to content

Commit 98f3963

Browse files
committed
TLSSocketWrapper: accept positive result for parse_certificates
1 parent 1e091b9 commit 98f3963

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

features/netsocket/TLSSocketWrapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ nsapi_error_t TLSSocketWrapper::set_root_ca_cert(const void *root_ca, size_t len
113113
ret = mbedtls_x509_crt_parse(crt, static_cast<const unsigned char *>(root_ca), len);
114114
break;
115115
}
116-
if (ret != 0) {
116+
if (ret < 0) {
117117
print_mbedtls_error("mbedtls_x509_crt_parse", ret);
118118
mbedtls_x509_crt_free(crt);
119119
delete crt;

0 commit comments

Comments
 (0)