Пример #1
0
static int test_builtin_provider(void)
{
    const char *name = "p_test_builtin";

    return
        TEST_true(OSSL_PROVIDER_add_builtin(NULL, name,
                                            PROVIDER_INIT_FUNCTION_NAME))
        && test_provider(name);
}
Пример #2
0
static int test_loaded_provider(void)
{
    const char *name = "p_test";
    OSSL_PROVIDER *prov = NULL;

    return
        TEST_ptr(prov = ossl_provider_new(NULL, name, NULL))
        && test_provider(prov, expected_greeting1(name));
}
Пример #3
0
static int test_builtin_provider(void)
{
    const char *name = "p_test_builtin";
    OSSL_PROVIDER *prov = NULL;

    return
        TEST_ptr(prov =
                 ossl_provider_new(NULL, name, PROVIDER_INIT_FUNCTION_NAME))
        && test_provider(prov, expected_greeting1(name));
}
Пример #4
0
static int test_configured_provider(void)
{
    const char *name = "p_test_configured";
    OSSL_PROVIDER *prov = NULL;
    /* This MUST match the config file */
    const char *expected_greeting =
        "Hello OpenSSL, greetings from Test Provider";

    return
        OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL)
        && TEST_ptr(prov = ossl_provider_find(NULL, name))
        && test_provider(prov, expected_greeting);
}
Пример #5
0
static int test_loaded_provider(void)
{
    const char *name = "p_test";

    return test_provider(name);
}