forked from TrueCloudLab/certificates
Add AuthorityKeyId to root certificate.
Fix error string.
This commit is contained in:
parent
3e40cb89a7
commit
97508ca215
1 changed files with 2 additions and 1 deletions
|
@ -187,6 +187,7 @@ func createPKI(k kms.KeyManager, c Config) error {
|
||||||
Subject: pkix.Name{CommonName: "YubiKey Smallstep Root"},
|
Subject: pkix.Name{CommonName: "YubiKey Smallstep Root"},
|
||||||
SerialNumber: mustSerialNumber(),
|
SerialNumber: mustSerialNumber(),
|
||||||
SubjectKeyId: mustSubjectKeyID(resp.PublicKey),
|
SubjectKeyId: mustSubjectKeyID(resp.PublicKey),
|
||||||
|
AuthorityKeyId: mustSubjectKeyID(resp.PublicKey),
|
||||||
}
|
}
|
||||||
|
|
||||||
b, err := x509.CreateCertificate(rand.Reader, template, template, resp.PublicKey, signer)
|
b, err := x509.CreateCertificate(rand.Reader, template, template, resp.PublicKey, signer)
|
||||||
|
@ -225,7 +226,7 @@ func createPKI(k kms.KeyManager, c Config) error {
|
||||||
if c.RootOnly {
|
if c.RootOnly {
|
||||||
priv, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
|
priv, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "error creating intermediate public key")
|
return errors.Wrap(err, "error creating intermediate key")
|
||||||
}
|
}
|
||||||
|
|
||||||
pass, err := ui.PromptPasswordGenerate("What do you want your password to be? [leave empty and we'll generate one]",
|
pass, err := ui.PromptPasswordGenerate("What do you want your password to be? [leave empty and we'll generate one]",
|
||||||
|
|
Loading…
Reference in a new issue