File tree Expand file tree Collapse file tree 1 file changed +8
-16
lines changed
Expand file tree Collapse file tree 1 file changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -62,14 +62,10 @@ def parse_certificate(cert: str | bytes) -> JWK:
6262 try :
6363 return parse_pem (cert )
6464 except Exception :
65- pass
66-
67- try :
68- return parse_pem (DER_cert_to_PEM_cert (cert ))
69- except Exception :
70- pass
71-
72- raise InvalidJwk (f"unable to parse key from pem: { cert } " )
65+ try :
66+ return parse_pem (DER_cert_to_PEM_cert (cert ))
67+ except Exception :
68+ raise InvalidJwk (f"unable to parse key from pem: { cert } " )
7369
7470def parse_b64der (b64der : str ) -> JWK :
7571 """
@@ -97,11 +93,7 @@ def parse_x5c_keys(x5c: list[str]) -> list[JWK]:
9793 try :
9894 return [parse_certificate (cert ) for cert in x5c ]
9995 except Exception :
100- pass
101-
102- try :
103- return [parse_certificate (DER_cert_to_PEM_cert (cert )) for cert in x5c ]
104- except Exception :
105- pass
106-
107- raise InvalidJwk (f"unable to parse key from pem chain: { x5c } " )
96+ try :
97+ return [parse_certificate (DER_cert_to_PEM_cert (cert )) for cert in x5c ]
98+ except Exception :
99+ raise InvalidJwk (f"unable to parse key from pem chain: { x5c } " )
You can’t perform that action at this time.
0 commit comments