File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
src/DIRAC/FrameworkSystem/scripts Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -269,11 +269,12 @@ def loginWithCertificate(self):
269
269
270
270
chain = X509Chain ()
271
271
# Load user cert and key
272
- result = chain .loadChainFromFile (self .certLoc )
273
- if result ["OK" ]:
274
- result = chain .loadKeyFromFile (
275
- self .keyLoc , password = prompt ("Enter Certificate password: " , is_password = True )
276
- )
272
+
273
+ if (result := chain .loadChainFromFile (self .certLoc ))["OK" ]:
274
+ # We try to download the key first without a password
275
+ if not (result := chain .loadKeyFromFile (self .keyLoc ))["OK" ]:
276
+ password = prompt ("Enter Certificate password: " , is_password = True )
277
+ result = chain .loadKeyFromFile (self .keyLoc , password = password )
277
278
if not result ["OK" ]:
278
279
return result
279
280
You can’t perform that action at this time.
0 commit comments