This is an automated email from the ASF dual-hosted git repository.
mssun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave.git
The following commit(s) were added to refs/heads/master by this push:
new 9521183 Fix certification verification issue (#622)
9521183 is described below
commit 9521183c60dc9c5ecf7d654fd2fc935b5e3d2714
Author: Mingshen Sun <[email protected]>
AuthorDate: Wed Feb 9 17:37:11 2022 -0800
Fix certification verification issue (#622)
---
sdk/python/teaclave.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sdk/python/teaclave.py b/sdk/python/teaclave.py
index b7a59b5..473a326 100644
--- a/sdk/python/teaclave.py
+++ b/sdk/python/teaclave.py
@@ -180,9 +180,11 @@ class TeaclaveService:
store = X509Store()
store.add_cert(as_root_ca_cert)
- for c in certs:
- store.add_cert(c)
- store_ctx = X509StoreContext(store, as_root_ca_cert)
+ client_cert = certs[0]
+ if len(certs) > 1:
+ for c in certs[1:]:
+ store.add_cert(c)
+ store_ctx = X509StoreContext(store, client_cert)
try:
store_ctx.verify_certificate()
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]