Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/crypto/x509/x509.go
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,7 @@ var (
oidExtKeyUsageNetscapeServerGatedCrypto = asn1.ObjectIdentifier{2, 16, 840, 1, 113730, 4, 1}
oidExtKeyUsageMicrosoftCommercialCodeSigning = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 311, 2, 1, 22}
oidExtKeyUsageMicrosoftKernelCodeSigning = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 311, 61, 1, 1}
oidExtKeyUsageEkCertificate = asn1.ObjectIdentifier{2, 23, 133, 8, 1}
)

// ExtKeyUsage represents an extended set of actions that are valid for a given key.
Expand All @@ -642,6 +643,7 @@ const (
ExtKeyUsageNetscapeServerGatedCrypto
ExtKeyUsageMicrosoftCommercialCodeSigning
ExtKeyUsageMicrosoftKernelCodeSigning
ExtKeyUsageEkCertificate
)

// extKeyUsageOIDs contains the mapping between an ExtKeyUsage and its OID.
Expand All @@ -663,6 +665,7 @@ var extKeyUsageOIDs = []struct {
{ExtKeyUsageNetscapeServerGatedCrypto, oidExtKeyUsageNetscapeServerGatedCrypto},
{ExtKeyUsageMicrosoftCommercialCodeSigning, oidExtKeyUsageMicrosoftCommercialCodeSigning},
{ExtKeyUsageMicrosoftKernelCodeSigning, oidExtKeyUsageMicrosoftKernelCodeSigning},
{ExtKeyUsageEkCertificate, oidExtKeyUsageEkCertificate},
}

func extKeyUsageFromOID(oid asn1.ObjectIdentifier) (eku ExtKeyUsage, ok bool) {
Expand Down