diff --git a/tests/e2e_logging.py b/tests/e2e_logging.py index 523a67bd63d5..c9af951c35ba 100644 --- a/tests/e2e_logging.py +++ b/tests/e2e_logging.py @@ -35,28 +35,28 @@ from loguru import logger as LOG -from OpenSSL.crypto import ( - # dump_certificate, - load_certificate, - # FILETYPE_TEXT, - FILETYPE_PEM, - X509, - X509Store, - X509StoreContext, -) - - -def verify_endorsements_openssl(service_cert, receipt): - node_cert_pem = receipt["cert"].encode() - store = X509Store() - store.add_cert(X509.from_cryptography(service_cert)) - chain = None - if "service_endorsements" in receipt: - chain = [] - for endo in receipt["service_endorsements"]: - chain.append(load_certificate(FILETYPE_PEM, endo.encode())) - ctx = X509StoreContext(store, load_certificate(FILETYPE_PEM, node_cert_pem), chain) - ctx.verify_certificate() # throws on error +# from OpenSSL.crypto import ( +# # dump_certificate, +# load_certificate, +# # FILETYPE_TEXT, +# FILETYPE_PEM, +# X509, +# X509Store, +# X509StoreContext, +# ) + + +# def verify_endorsements_openssl(service_cert, receipt): +# node_cert_pem = receipt["cert"].encode() +# store = X509Store() +# store.add_cert(X509.from_cryptography(service_cert)) +# chain = None +# if "service_endorsements" in receipt: +# chain = [] +# for endo in receipt["service_endorsements"]: +# chain.append(load_certificate(FILETYPE_PEM, endo.encode())) +# ctx = X509StoreContext(store, load_certificate(FILETYPE_PEM, node_cert_pem), chain) +# ctx.verify_certificate() # throws on error def verify_receipt(