summaryrefslogtreecommitdiff
path: root/indra/newview/tests/llsechandler_basic_test.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-10-22 15:27:15 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-10-22 15:27:15 +0300
commit07aa342bc4060ff4b4b38cfa60550835dd744f1f (patch)
treed0dbdc534d4144ed805ee62cc90a43115ec8929e /indra/newview/tests/llsechandler_basic_test.cpp
parentb078daf4d24d290abdc222e9cd3ef272c93ba5fa (diff)
parentcbaba2df56c66926e051d50b6cb02955c81c2a6c (diff)
Merge branch 'master' into DRTVWR-530-maint
# Conflicts: # autobuild.xml
Diffstat (limited to 'indra/newview/tests/llsechandler_basic_test.cpp')
-rw-r--r--indra/newview/tests/llsechandler_basic_test.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp
index e5d226a2a4..4c8d6c51b0 100644
--- a/indra/newview/tests/llsechandler_basic_test.cpp
+++ b/indra/newview/tests/llsechandler_basic_test.cpp
@@ -1217,8 +1217,8 @@ namespace tut
// Single cert in the chain.
X509_STORE_CTX *test_store = X509_STORE_CTX_new();
- test_store->cert = mX509ChildCert;
- test_store->untrusted = NULL;
+ X509_STORE_CTX_set_cert(test_store, mX509ChildCert);
+ X509_STORE_CTX_set0_untrusted(test_store, NULL);
test_chain = new LLBasicCertificateChain(test_store);
X509_STORE_CTX_free(test_store);
ensure_equals("two elements in store", test_chain->size(), 1);
@@ -1229,9 +1229,9 @@ namespace tut
// cert + CA
test_store = X509_STORE_CTX_new();
- test_store->cert = mX509ChildCert;
- test_store->untrusted = sk_X509_new_null();
- sk_X509_push(test_store->untrusted, mX509IntermediateCert);
+ X509_STORE_CTX_set_cert(test_store, mX509ChildCert);
+ X509_STORE_CTX_set0_untrusted(test_store, sk_X509_new_null());
+ sk_X509_push(X509_STORE_CTX_get0_untrusted(test_store), mX509IntermediateCert);
test_chain = new LLBasicCertificateChain(test_store);
X509_STORE_CTX_free(test_store);
ensure_equals("two elements in store", test_chain->size(), 2);
@@ -1245,9 +1245,9 @@ namespace tut
// cert + nonrelated
test_store = X509_STORE_CTX_new();
- test_store->cert = mX509ChildCert;
- test_store->untrusted = sk_X509_new_null();
- sk_X509_push(test_store->untrusted, mX509TestCert);
+ X509_STORE_CTX_set_cert(test_store, mX509ChildCert);
+ X509_STORE_CTX_set0_untrusted(test_store, sk_X509_new_null());
+ sk_X509_push(X509_STORE_CTX_get0_untrusted(test_store), mX509TestCert);
test_chain = new LLBasicCertificateChain(test_store);
X509_STORE_CTX_free(test_store);
ensure_equals("two elements in store", test_chain->size(), 1);
@@ -1257,10 +1257,10 @@ namespace tut
// cert + CA + nonrelated
test_store = X509_STORE_CTX_new();
- test_store->cert = mX509ChildCert;
- test_store->untrusted = sk_X509_new_null();
- sk_X509_push(test_store->untrusted, mX509IntermediateCert);
- sk_X509_push(test_store->untrusted, mX509TestCert);
+ X509_STORE_CTX_set_cert(test_store, mX509ChildCert);
+ X509_STORE_CTX_set0_untrusted(test_store, sk_X509_new_null());
+ sk_X509_push(X509_STORE_CTX_get0_untrusted(test_store), mX509IntermediateCert);
+ sk_X509_push(X509_STORE_CTX_get0_untrusted(test_store), mX509TestCert);
test_chain = new LLBasicCertificateChain(test_store);
X509_STORE_CTX_free(test_store);
ensure_equals("two elements in store", test_chain->size(), 2);
@@ -1273,10 +1273,10 @@ namespace tut
// cert + intermediate + CA
test_store = X509_STORE_CTX_new();
- test_store->cert = mX509ChildCert;
- test_store->untrusted = sk_X509_new_null();
- sk_X509_push(test_store->untrusted, mX509IntermediateCert);
- sk_X509_push(test_store->untrusted, mX509RootCert);
+ X509_STORE_CTX_set_cert(test_store, mX509ChildCert);
+ X509_STORE_CTX_set0_untrusted(test_store, sk_X509_new_null());
+ sk_X509_push(X509_STORE_CTX_get0_untrusted(test_store), mX509IntermediateCert);
+ sk_X509_push(X509_STORE_CTX_get0_untrusted(test_store), mX509RootCert);
test_chain = new LLBasicCertificateChain(test_store);
X509_STORE_CTX_free(test_store);
ensure_equals("three elements in store", test_chain->size(), 3);