[openssl-commits] [openssl] master update
Richard Levitte
levitte at openssl.org
Wed Feb 7 15:16:16 UTC 2018
The branch master has been updated
via 3a7141df8768e797f42ed14027e974ea845aa20f (commit)
via 7d3901f6dbaace18c0307b1f6a20f38fe6a91807 (commit)
via 227a1e3f45bf06fdb00f2bdfb922f6f0d1f1d1de (commit)
from bed4afa81b9c94596cae44226e7506d9b07fe5a5 (commit)
- Log -----------------------------------------------------------------
commit 3a7141df8768e797f42ed14027e974ea845aa20f
Author: Richard Levitte <levitte at openssl.org>
Date: Wed Feb 7 14:05:20 2018 +0100
Make all private functions in e_afalg.c static
Reviewed-by: Rich Salz <rsalz at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5270)
commit 7d3901f6dbaace18c0307b1f6a20f38fe6a91807
Author: Richard Levitte <levitte at openssl.org>
Date: Wed Feb 7 14:02:49 2018 +0100
test/recipes/30-test_afalg.t: set OPENSSL_ENGINES correctly
The afalg engine was moved down from engines/afalg/ to engines/, but
the test wasn't changed accordingly. This was undetected because the
test program didn't fail when it couldn't load the engine.
Reviewed-by: Rich Salz <rsalz at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5270)
commit 227a1e3f45bf06fdb00f2bdfb922f6f0d1f1d1de
Author: Richard Levitte <levitte at openssl.org>
Date: Wed Feb 7 14:01:13 2018 +0100
Modify test/afalgtest to fail if the afalg engine couldn't be loaded
If you know that there's no afalg engine, don't run this test.
test/recipes/30-test_afalg.t checks this correctly.
Reviewed-by: Rich Salz <rsalz at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5270)
-----------------------------------------------------------------------
Summary of changes:
engines/e_afalg.c | 10 +++++-----
test/afalgtest.c | 10 +++++-----
test/recipes/30-test_afalg.t | 2 +-
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/engines/e_afalg.c b/engines/e_afalg.c
index 49b0173..da035b5 100644
--- a/engines/e_afalg.c
+++ b/engines/e_afalg.c
@@ -79,7 +79,7 @@ static int afalg_create_sk(afalg_ctx *actx, const char *ciphertype,
static int afalg_destroy(ENGINE *e);
static int afalg_init(ENGINE *e);
static int afalg_finish(ENGINE *e);
-const EVP_CIPHER *afalg_aes_cbc(int nid);
+static const EVP_CIPHER *afalg_aes_cbc(int nid);
static cbc_handles *get_cipher_handle(int nid);
static int afalg_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
const int **nids, int nid);
@@ -195,7 +195,7 @@ static int afalg_setup_async_event_notification(afalg_aio *aio)
return 1;
}
-int afalg_init_aio(afalg_aio *aio)
+static int afalg_init_aio(afalg_aio *aio)
{
int r = -1;
@@ -215,8 +215,8 @@ int afalg_init_aio(afalg_aio *aio)
return 1;
}
-int afalg_fin_cipher_aio(afalg_aio *aio, int sfd, unsigned char *buf,
- size_t len)
+static int afalg_fin_cipher_aio(afalg_aio *aio, int sfd, unsigned char *buf,
+ size_t len)
{
int r;
int retry = 0;
@@ -658,7 +658,7 @@ static cbc_handles *get_cipher_handle(int nid)
}
}
-const EVP_CIPHER *afalg_aes_cbc(int nid)
+static const EVP_CIPHER *afalg_aes_cbc(int nid)
{
cbc_handles *cipher_handle = get_cipher_handle(nid);
if (cipher_handle->_hidden == NULL
diff --git a/test/afalgtest.c b/test/afalgtest.c
index adb2977..bf90545 100644
--- a/test/afalgtest.c
+++ b/test/afalgtest.c
@@ -128,14 +128,14 @@ int global_init(void)
int setup_tests(void)
{
#ifndef OPENSSL_NO_ENGINE
- if ((e = ENGINE_by_id("afalg")) == NULL) {
+ if (!TEST_ptr(e = ENGINE_by_id("afalg"))) {
/* Probably a platform env issue, not a test failure. */
- TEST_info("Can't load AFALG engine");
- } else {
+ TEST_info("Can't load AFALG engine, you might want to check $OPENSSL_ENGINES");
+ return 0;
+ }
# ifndef OPENSSL_NO_AFALGENG
- ADD_ALL_TESTS(test_afalg_aes_cbc, 3);
+ ADD_ALL_TESTS(test_afalg_aes_cbc, 3);
# endif
- }
#endif
return 1;
diff --git a/test/recipes/30-test_afalg.t b/test/recipes/30-test_afalg.t
index c8cb67b..cf8a68f 100644
--- a/test/recipes/30-test_afalg.t
+++ b/test/recipes/30-test_afalg.t
@@ -18,6 +18,6 @@ plan skip_all => "$test_name not supported for this build"
plan tests => 1;
-$ENV{OPENSSL_ENGINES} = bldtop_dir("engines/afalg");
+$ENV{OPENSSL_ENGINES} = bldtop_dir("engines");
ok(run(test(["afalgtest"])), "running afalgtest");
More information about the openssl-commits
mailing list