Skip to content

Commit e406594

Browse files
x509ext: Fix OID check
1 parent b99a5a1 commit e406594

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

x509ext/othername.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func OtherNames(cert *x509.Certificate) ([]*OtherName, error) {
110110

111111
// OtherNames returns the names from the otherName SAN extension.
112112
func OtherNamesFromExtension(ext pkix.Extension) ([]*OtherName, error) {
113-
if ext.Id.Equal(SubjectAlternativeNameOID) {
113+
if !ext.Id.Equal(SubjectAlternativeNameOID) {
114114
return nil, fmt.Errorf("extension is %s instead of Subject Alternative Name (%s)",
115115
ext.Id, SubjectAlternativeNameOID)
116116
}

0 commit comments

Comments
 (0)