forked from TrueCloudLab/certificates
Merge pull request #232 from wishdev/fingerprint
Add root fingerprint to pki if certificate given
This commit is contained in:
commit
59a57d487b
1 changed files with 4 additions and 0 deletions
|
@ -289,6 +289,10 @@ func (p *PKI) WriteRootCertificate(rootCrt *x509.Certificate, rootKey interface{
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sum := sha256.Sum256(rootCrt.Raw)
|
||||||
|
p.rootFingerprint = strings.ToLower(hex.EncodeToString(sum[:]))
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue