Use a switch statement instead of an if statement
This will make it cleaner to handle other extension types
This commit is contained in:
parent
196bd864cd
commit
fa1236f434
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue