Esempio n. 1
0
File: api.c Progetto: pykoder/cyassl
int ApiTest(void)
{
    printf(" Begin API Tests\n");
    test_CyaSSL_Init();
    test_CyaSSL_Method_Allocators();
    test_CyaSSL_CTX_new(CyaSSLv23_server_method());
#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS)
    test_CyaSSL_CTX_use_certificate_file();
    test_CyaSSL_CTX_use_PrivateKey_file();
    test_CyaSSL_CTX_load_verify_locations();
#ifndef NO_RSA
    test_server_CyaSSL_new();
    test_client_CyaSSL_new();
    test_CyaSSL_read_write();
#endif /* NO_RSA */
#endif /* NO_FILESYSTEM */
    test_CyaSSL_Cleanup();
    printf(" End API Tests\n");

    return TEST_SUCCESS;
}
Esempio n. 2
0
void ApiTest(void)
{
    printf(" Begin API Tests\n");
    test_CyaSSL_Init();

    test_CyaSSL_Method_Allocators();
    test_CyaSSL_CTX_new(CyaSSLv23_server_method());
    test_CyaSSL_CTX_use_certificate_file();
    test_CyaSSL_CTX_use_PrivateKey_file();
    test_CyaSSL_CTX_load_verify_locations();
    test_server_CyaSSL_new();
    test_client_CyaSSL_new();
    test_CyaSSL_read_write();

    /* TLS extensions tests */
    test_CyaSSL_UseSNI();
    test_CyaSSL_UseMaxFragment();
    test_CyaSSL_UseTruncatedHMAC();
    test_CyaSSL_UseSupportedCurve();

    test_CyaSSL_Cleanup();
    printf(" End API Tests\n");
}