forked from TrueCloudLab/certificates
Remove policy validation on renew
This commit is contained in:
parent
ccd93684c3
commit
2eba5326db
1 changed files with 6 additions and 3 deletions
|
@ -348,9 +348,12 @@ func (a *Authority) Rekey(oldCert *x509.Certificate, pk crypto.PublicKey) ([]*x5
|
||||||
newCert.ExtraExtensions = append(newCert.ExtraExtensions, ext)
|
newCert.ExtraExtensions = append(newCert.ExtraExtensions, ext)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the certificate is allowed to be renewed, policies or
|
// Check if the certificate is allowed to be renewed, name constraints might
|
||||||
// constraints might change over time.
|
// change over time.
|
||||||
if err := a.isAllowedToSignX509Certificate(newCert); err != nil {
|
//
|
||||||
|
// TODO(hslatman,maraino): consider adding policies too and consider if
|
||||||
|
// RenewSSH should check policies.
|
||||||
|
if err := a.constraintsEngine.ValidateCertificate(newCert); err != nil {
|
||||||
var ee *errs.Error
|
var ee *errs.Error
|
||||||
if errors.As(err, &ee) {
|
if errors.As(err, &ee) {
|
||||||
return nil, errs.ApplyOptions(ee, opts...)
|
return nil, errs.ApplyOptions(ee, opts...)
|
||||||
|
|
Loading…
Add table
Reference in a new issue