Skip to content

Commit

Permalink
lib-dcrypt: Skip checks if no backend found
Browse files Browse the repository at this point in the history
  • Loading branch information
cmouse authored and sirainen committed Aug 4, 2016
1 parent e26dc88 commit baf8f0a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/lib-dcrypt/test-crypto.c
Expand Up @@ -619,7 +619,10 @@ void test_load_invalid_keys(void) {

int main(void) {
random_init();
dcrypt_initialize("openssl", NULL, NULL);
if (!dcrypt_initialize(NULL, NULL, NULL)) {
i_error("No functional dcrypt backend found - skipping tests");
return 0;
}

static void (*test_functions[])(void) = {
test_cipher_test_vectors,
Expand Down
5 changes: 4 additions & 1 deletion src/lib-dcrypt/test-stream.c
Expand Up @@ -424,7 +424,10 @@ void test_free_keys() {
}

int main(void) {
dcrypt_initialize("openssl", NULL, NULL);
if (!dcrypt_initialize(NULL, NULL, NULL)) {
i_error("No functional dcrypt backend found - skipping tests");
return 0;
}
random_init();

test_assert(dcrypt_key_load_private(&test_v1_kp.priv, key_v1_priv, NULL, NULL, NULL));
Expand Down

0 comments on commit baf8f0a

Please sign in to comment.