Skip to content

crypto/x509: redundant UnknownExtKeyUsage check in verify.go #73289

Description

@MikhailLipanin

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions