drGrove / drGrove/mtls-cli

Possible bug in in `_has_root_cert`

Open
#52 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
29
Forks
7
PR merge metrics
No merged PRs in 30d

Description

I added some debug prints:

```
def _has_root_cert(self):
if sys.platform == "darwin":
name = self.ca_cert_file_path
else:
name = "{server} Root CA".format(server=self.server)
print("Vaild cert? ")
print(self.check_valid_cert(name, usage="CT,T,T", is_root=True))
if self.check_valid_cert(name, usage="CT,T,T", is_root=True):
print("Yes? True.")
return True
print("No? False.")
return False
```

result:

```
> mtls -s some-prod certificate create
Retrieving CRL from server...
Writing CRL to /home/dpc/.config/mtls/some-prod/crl.pem
Vaild cert?
(False, False, False)
Yes? True.
Decrypting User Key...
Generating CSR for bitgo-prod
Signing CSR for verification on server...
CSR Public key does not match previous user key
```

AFAICT a tuple of three `False` values becomes `True`, which is :sus:.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.