|
@@ -1742,20 +1742,20 @@ void ssl_server(void *pvParameters)
|
|
ret = x509parse_crt(&srvcert, (unsigned char *) test_srv_crt, strlen(test_srv_crt));
|
|
ret = x509parse_crt(&srvcert, (unsigned char *) test_srv_crt, strlen(test_srv_crt));
|
|
if(ret != 0)
|
|
if(ret != 0)
|
|
{
|
|
{
|
|
- //printf(" failed\n ! x509parse_crt returned %d\n\r", ret);
|
|
|
|
|
|
+ printf(" failed\n ! x509parse_crt returned %d\n\r", ret);
|
|
goto exit;
|
|
goto exit;
|
|
}
|
|
}
|
|
ret = x509parse_crt(&srvcert, (unsigned char *) test_ca_crt, strlen(test_ca_crt));
|
|
ret = x509parse_crt(&srvcert, (unsigned char *) test_ca_crt, strlen(test_ca_crt));
|
|
if(ret != 0)
|
|
if(ret != 0)
|
|
{
|
|
{
|
|
- //printf(" failed\n ! x509parse_crt returned %d\n\r", ret);
|
|
|
|
|
|
+ printf(" failed\n ! x509parse_crt returned %d\n\r", ret);
|
|
goto exit;
|
|
goto exit;
|
|
}
|
|
}
|
|
rsa_init( &rsa, RSA_PKCS_V15, 0 );
|
|
rsa_init( &rsa, RSA_PKCS_V15, 0 );
|
|
ret = x509parse_key(&rsa, (unsigned char *) test_srv_key, strlen(test_srv_key), NULL, 0);
|
|
ret = x509parse_key(&rsa, (unsigned char *) test_srv_key, strlen(test_srv_key), NULL, 0);
|
|
if( ret != 0 )
|
|
if( ret != 0 )
|
|
{
|
|
{
|
|
- //printf(" failed\n ! x509parse_key returned %d\n\r", ret);
|
|
|
|
|
|
+ printf(" failed\n ! x509parse_key returned %d\n\r", ret);
|
|
goto exit;
|
|
goto exit;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1766,7 +1766,7 @@ void ssl_server(void *pvParameters)
|
|
ret = net_bind(&listen_fd, NULL, 443);
|
|
ret = net_bind(&listen_fd, NULL, 443);
|
|
if(ret != 0)
|
|
if(ret != 0)
|
|
{
|
|
{
|
|
- //printf(" failed\n ! net_bind returned %d\n\r", ret);
|
|
|
|
|
|
+ printf(" failed\n ! net_bind returned %d\n\r", ret);
|
|
goto exit;
|
|
goto exit;
|
|
}
|
|
}
|
|
//printf(" ok\n\r");
|
|
//printf(" ok\n\r");
|
|
@@ -1778,8 +1778,9 @@ void ssl_server(void *pvParameters)
|
|
ret = net_accept(listen_fd, &client_fd, NULL);
|
|
ret = net_accept(listen_fd, &client_fd, NULL);
|
|
if(ret != 0)
|
|
if(ret != 0)
|
|
{
|
|
{
|
|
- //printf(" failed\n ! net_accept returned %d\n\n", ret);
|
|
|
|
- goto exit;
|
|
|
|
|
|
+ printf(" failed\n ! net_accept returned %d\n\n", ret);
|
|
|
|
+ //goto exit;
|
|
|
|
+ goto accept;
|
|
}
|
|
}
|
|
//printf(" ok\n");
|
|
//printf(" ok\n");
|
|
|
|
|
|
@@ -1790,7 +1791,7 @@ void ssl_server(void *pvParameters)
|
|
ret = ssl_init(&ssl);
|
|
ret = ssl_init(&ssl);
|
|
if(ret != 0)
|
|
if(ret != 0)
|
|
{
|
|
{
|
|
- //printf(" failed\n ! ssl_init returned %d\n\n", ret);
|
|
|
|
|
|
+ printf(" failed\n ! ssl_init returned %d\n\n", ret);
|
|
goto accept;
|
|
goto accept;
|
|
}
|
|
}
|
|
//printf(" ok\n");
|
|
//printf(" ok\n");
|