diff options
author | Dr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com> | 2020-10-15 12:55:50 +0300 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-10-15 11:59:53 +0100 |
commit | b425001010044adbdbcd98f8682694b30b73bbf4 (patch) | |
tree | e87a5b512d7869cb6a500ecc74b706281be762cf /test/asynctest.c | |
parent | 29000e43ea257bf54f6ccb2064b3744853b821b2 (diff) | |
download | openssl-b425001010044adbdbcd98f8682694b30b73bbf4.zip openssl-b425001010044adbdbcd98f8682694b30b73bbf4.tar.gz openssl-b425001010044adbdbcd98f8682694b30b73bbf4.tar.bz2 |
Rename OPENSSL_CTX prefix to OSSL_LIB_CTX
Many of the new types introduced by OpenSSL 3.0 have an OSSL_ prefix,
e.g., OSSL_CALLBACK, OSSL_PARAM, OSSL_ALGORITHM, OSSL_SERIALIZER.
The OPENSSL_CTX type stands out a little by using a different prefix.
For consistency reasons, this type is renamed to OSSL_LIB_CTX.
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12621)
Diffstat (limited to 'test/asynctest.c')
-rw-r--r-- | test/asynctest.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/test/asynctest.c b/test/asynctest.c index a7aab8e..6502ee9 100644 --- a/test/asynctest.c +++ b/test/asynctest.c @@ -45,33 +45,33 @@ static int save_current(void *args) static int change_deflt_libctx(void *args) { - OPENSSL_CTX *libctx = OPENSSL_CTX_new(); - OPENSSL_CTX *oldctx, *tmpctx; + OSSL_LIB_CTX *libctx = OSSL_LIB_CTX_new(); + OSSL_LIB_CTX *oldctx, *tmpctx; int ret = 0; if (libctx == NULL) return 0; - oldctx = OPENSSL_CTX_set0_default(libctx); + oldctx = OSSL_LIB_CTX_set0_default(libctx); ASYNC_pause_job(); /* Check the libctx is set up as we expect */ - tmpctx = OPENSSL_CTX_set0_default(oldctx); + tmpctx = OSSL_LIB_CTX_set0_default(oldctx); if (tmpctx != libctx) goto err; /* Set it back again to continue to use our own libctx */ - oldctx = OPENSSL_CTX_set0_default(libctx); + oldctx = OSSL_LIB_CTX_set0_default(libctx); ASYNC_pause_job(); /* Check the libctx is set up as we expect */ - tmpctx = OPENSSL_CTX_set0_default(oldctx); + tmpctx = OSSL_LIB_CTX_set0_default(oldctx); if (tmpctx != libctx) goto err; ret = 1; err: - OPENSSL_CTX_free(libctx); + OSSL_LIB_CTX_free(libctx); return ret; } @@ -344,8 +344,8 @@ static int test_ASYNC_start_job_ex(void) ASYNC_JOB *job = NULL; int funcret; ASYNC_WAIT_CTX *waitctx = NULL; - OPENSSL_CTX *libctx = OPENSSL_CTX_new(); - OPENSSL_CTX *oldctx, *tmpctx, *globalctx; + OSSL_LIB_CTX *libctx = OSSL_LIB_CTX_new(); + OSSL_LIB_CTX *oldctx, *tmpctx, *globalctx; int ret = 0; if (libctx == NULL) { @@ -354,7 +354,7 @@ static int test_ASYNC_start_job_ex(void) goto err; } - globalctx = oldctx = OPENSSL_CTX_set0_default(libctx); + globalctx = oldctx = OSSL_LIB_CTX_set0_default(libctx); if ((waitctx = ASYNC_WAIT_CTX_new()) == NULL || ASYNC_start_job(&job, waitctx, &funcret, change_deflt_libctx, @@ -366,8 +366,8 @@ static int test_ASYNC_start_job_ex(void) } /* Reset the libctx temporarily to find out what it is*/ - tmpctx = OPENSSL_CTX_set0_default(oldctx); - oldctx = OPENSSL_CTX_set0_default(tmpctx); + tmpctx = OSSL_LIB_CTX_set0_default(oldctx); + oldctx = OSSL_LIB_CTX_set0_default(tmpctx); if (tmpctx != libctx) { fprintf(stderr, "test_ASYNC_start_job_ex() failed - unexpected libctx\n"); @@ -382,7 +382,7 @@ static int test_ASYNC_start_job_ex(void) } /* Reset the libctx and continue with the global default libctx */ - tmpctx = OPENSSL_CTX_set0_default(oldctx); + tmpctx = OSSL_LIB_CTX_set0_default(oldctx); if (tmpctx != libctx) { fprintf(stderr, "test_ASYNC_start_job_ex() failed - unexpected libctx\n"); @@ -398,8 +398,8 @@ static int test_ASYNC_start_job_ex(void) } /* Reset the libctx temporarily to find out what it is*/ - tmpctx = OPENSSL_CTX_set0_default(libctx); - OPENSSL_CTX_set0_default(tmpctx); + tmpctx = OSSL_LIB_CTX_set0_default(libctx); + OSSL_LIB_CTX_set0_default(tmpctx); if (tmpctx != globalctx) { fprintf(stderr, "test_ASYNC_start_job_ex() failed - global libctx check failed\n"); @@ -409,7 +409,7 @@ static int test_ASYNC_start_job_ex(void) ret = 1; err: ASYNC_WAIT_CTX_free(waitctx); - OPENSSL_CTX_free(libctx); + OSSL_LIB_CTX_free(libctx); return ret; } |