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
|
#ifdef CONFIG_SSL_CERT_VERIFICATION
|
||||||
case SSL_OBJ_X509_CACERT:
|
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;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -703,13 +703,13 @@ static int cert_tests(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ssl_ctx_free(ssl_ctx);
|
ssl_ctx_free(ssl_ctx);
|
||||||
|
res = 0; /* all ok */
|
||||||
res = 0; /* all ok */
|
|
||||||
printf("All Certificate tests passed\n");
|
printf("All Certificate tests passed\n");
|
||||||
|
|
||||||
bad_cert:
|
bad_cert:
|
||||||
if (res)
|
if (res)
|
||||||
printf("Error: A certificate test failed\n");
|
printf("Error: A certificate test failed\n");
|
||||||
|
|
||||||
return res;
|
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)
|
if (ssl_ctx->options & SSL_DISPLAY_CERTS)
|
||||||
x509_print(ca_cert_ctx->cert[i], NULL);
|
x509_print(ca_cert_ctx->cert[i], NULL);
|
||||||
#endif
|
#endif
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
i++;
|
||||||
len -= offset;
|
len -= offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,15 +200,13 @@ int x509_new(const uint8_t *cert, int *len, X509_CTX **ctx)
|
|||||||
asn1_signature(cert, &offset, x509_ctx))
|
asn1_signature(cert, &offset, x509_ctx))
|
||||||
goto end_cert;
|
goto end_cert;
|
||||||
#endif
|
#endif
|
||||||
|
ret = X509_OK;
|
||||||
|
end_cert:
|
||||||
if (len)
|
if (len)
|
||||||
{
|
{
|
||||||
*len = cert_size;
|
*len = cert_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = X509_OK;
|
|
||||||
end_cert:
|
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_SSL_FULL_MODE
|
#ifdef CONFIG_SSL_FULL_MODE
|
||||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user