Skip to content
Snippets Groups Projects
Verified Commit 9f1cbbc6 authored by Heiko Reese's avatar Heiko Reese :dizzy_face:
Browse files

fix: function IsUserHarica now uses raw issuer instead of (wrong) string representation

parent 268cd49c
No related branches found
No related tags found
No related merge requests found
Pipeline #420966 failed
......@@ -70,13 +70,12 @@ var SectigoPersonalFilter = func(c *x509.Certificate) bool {
// IsUserHarica returns true if the certificate is a user certificate issued by HARICA
var IsUserHarica = func(c *x509.Certificate) bool {
haricaIssuers := []string{
"C=GR, O=Hellenic Academic and Research Institutions CA, CN=HARICA Client RSA Root CA 2021",
"C=GR, O=Hellenic Academic and Research Institutions CA, CN=GEANT S/MIME RSA 1",
"C=GR, O=Hellenic Academic and Research Institutions CA, CN=HARICA Client ECC Root CA 2021",
"C=GR, O=Hellenic Academic and Research Institutions CA, CN=GEANT S/MIME ECC 1",
for _, rawIssuer := range CertificateIssuer[CAIdentifierHARICA] {
if bytes.Contains(c.RawIssuer, rawIssuer) {
return true
}
}
return slices.Contains(haricaIssuers, c.Issuer.String())
return false
}
var NoCommonNameFilter = func(c *x509.Certificate) bool {
......@@ -522,6 +521,9 @@ func CertToSearchable(c *x509.Certificate) SearchableCert {
}
// Sorting order: Group > User > Ext > Server > Pseudonym
//if strings.Contains(cert.Subject, "carsten.thuemmel@kit.edu") && strings.Contains(cert.Issuer, "Hellen") {
// fmt.Println("XXX")
//}
switch {
case CertificateStats.FilterIsPseudonym(c):
cert.Type = Pseudonym
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment