Use a switch statement instead of an if statement

This will make it cleaner to handle other extension types
This commit is contained in:
Andrew Ayer 2016-06-08 15:57:56 -07:00
parent 196bd864cd
commit fa1236f434
1 changed files with 3 additions and 1 deletions

View File

@ -131,7 +131,9 @@ func ReconstructPrecertTBS (tbs *TBSCertificate) (*TBSCertificate, error) {
}
for _, ext := range tbs.Extensions {
if !ext.Id.Equal(oidExtensionSCT) {
switch {
case ext.Id.Equal(oidExtensionSCT):
default:
precertTBS.Extensions = append(precertTBS.Extensions, ext)
}
}