Source code: crypto/x509/verify.go
In crypto/x509 package, during ExtKeyUsage check, there are condition on presence of UnknownExtKeyUsage. I don't really understand, what the purpose of this check, since in that function there only uses of cert.ExtKeyUsage field and no cert. UnknownExtKeyUsage.
So, considering this block of code: if cert has no ExtKeyUsage, but some UnknownExtKeyUsage, we also go through the remaining logic.
What the purpose of this check?
Source code: crypto/x509/verify.go
In
crypto/x509package, during ExtKeyUsage check, there are condition on presence of UnknownExtKeyUsage. I don't really understand, what the purpose of this check, since in that function there only uses ofcert.ExtKeyUsagefield and nocert. UnknownExtKeyUsage.So, considering this block of code: if cert has no ExtKeyUsage, but some UnknownExtKeyUsage, we also go through the remaining logic.
What the purpose of this check?