mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-29 05:21:37 +03:00
fixed issue with bad certs on cygwin
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@202 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
@ -136,7 +136,7 @@ static int do_obj(SSL_CTX *ssl_ctx, int obj_type,
|
||||
|
||||
#ifdef CONFIG_SSL_CERT_VERIFICATION
|
||||
case SSL_OBJ_X509_CACERT:
|
||||
ret = add_cert_auth(ssl_ctx, ssl_obj->buf, ssl_obj->len);
|
||||
add_cert_auth(ssl_ctx, ssl_obj->buf, ssl_obj->len);
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
@ -703,13 +703,13 @@ static int cert_tests(void)
|
||||
}
|
||||
|
||||
ssl_ctx_free(ssl_ctx);
|
||||
|
||||
res = 0; /* all ok */
|
||||
res = 0; /* all ok */
|
||||
printf("All Certificate tests passed\n");
|
||||
|
||||
bad_cert:
|
||||
if (res)
|
||||
printf("Error: A certificate test failed\n");
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -421,9 +421,9 @@ int add_cert_auth(SSL_CTX *ssl_ctx, const uint8_t *buf, int len)
|
||||
if (ssl_ctx->options & SSL_DISPLAY_CERTS)
|
||||
x509_print(ca_cert_ctx->cert[i], NULL);
|
||||
#endif
|
||||
i++;
|
||||
}
|
||||
|
||||
i++;
|
||||
len -= offset;
|
||||
}
|
||||
|
||||
|
@ -200,15 +200,13 @@ int x509_new(const uint8_t *cert, int *len, X509_CTX **ctx)
|
||||
asn1_signature(cert, &offset, x509_ctx))
|
||||
goto end_cert;
|
||||
#endif
|
||||
|
||||
ret = X509_OK;
|
||||
end_cert:
|
||||
if (len)
|
||||
{
|
||||
*len = cert_size;
|
||||
}
|
||||
|
||||
ret = X509_OK;
|
||||
end_cert:
|
||||
|
||||
if (ret)
|
||||
{
|
||||
#ifdef CONFIG_SSL_FULL_MODE
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user