File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -105,8 +105,14 @@ def test_sign_does_not_produce_root(
105105 bundle = Bundle ().from_json (bundle_contents )
106106
107107 # Iterate over our cert chain and check for roots.
108- certs = bundle .verification_material .x509_certificate_chain
109- for x509cert in certs .certificates :
108+ if bundle .verification_material .is_set ("x509_certificate_chain" ):
109+ certs = bundle .verification_material .x509_certificate_chain .certificates
110+ elif bundle .verification_material .is_set ("certificate" ):
111+ certs = [bundle .verification_material .certificate ]
112+ else :
113+ assert False , "expected certs in either `x509_certificate_chain` or `certificate`"
114+
115+ for x509cert in certs :
110116 cert = x509 .load_der_x509_certificate (x509cert .raw_bytes )
111117
112118 try :
You can’t perform that action at this time.
0 commit comments