check serial is > 0

This commit is contained in:
Roland Shoemaker 2015-05-09 20:55:37 -07:00
parent 5e313dee4d
commit 2359e02000
1 changed files with 2 additions and 2 deletions

View File

@ -68,8 +68,8 @@ func NewCertificateAuthorityImpl(cadb core.CertificateAuthorityDatabase, config
logger := blog.GetAuditLogger()
logger.Notice("Certificate Authority Starting")
if config.SerialPrefix == 0 || config.SerialPrefix >= 256 {
err = errors.New("Must have non-zero serial prefix less than 256 for CA.")
if config.SerialPrefix <= 0 || config.SerialPrefix >= 256 {
err = errors.New("Must have a positive non-zero serial prefix less than 256 for CA.")
return nil, err
}