2 writes to Value
System.Security.Cryptography (1)
System\Security\Cryptography\Oid.cs (1)
18
this.
Value
= OidLookup.ToOid(oid, OidGroup.All, fallBackToAllGroups: false) ?? oid;
System.Security.Cryptography.Pkcs (1)
src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (1)
27
testOid.
Value
= Oids.Sha384;
181 references to Value
Binding.UDS.IntegrationTests (1)
ServiceHelper.cs (1)
61
if (AspNetHttpsOid.Equals(extension.Oid?.
Value
))
dotnet-dev-certs (3)
src\Shared\CertificateGeneration\CertificateManager.cs (3)
73
if (string.Equals(AspNetHttpsOid, extension.Oid?.
Value
, StringComparison.Ordinal))
148
.Any(e => string.Equals(oid, e.Oid?.
Value
, StringComparison.Ordinal));
153
.Where(e => string.Equals(AspNetHttpsOid, e.Oid?.
Value
, StringComparison.Ordinal))
dotnet-svcutil-lib (2)
CmdCredentialsProvider.cs (1)
104
if (oid.
Value
== OidClientAuthValue)
FrameworkFork\System.ServiceModel\System\IdentityModel\Claims\X509CertificateClaimSet.cs (1)
304
if (ext.Oid.
Value
== X509SubjectAlternativeNameConstants.Oid)
InMemory.FunctionalTests (1)
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (1)
449
writer.WriteObjectIdentifier(akidExtension.Oid.
Value
);
Microsoft.AspNetCore.DeveloperCertificates.XPlat (3)
src\Shared\CertificateGeneration\CertificateManager.cs (3)
73
if (string.Equals(AspNetHttpsOid, extension.Oid?.
Value
, StringComparison.Ordinal))
148
.Any(e => string.Equals(oid, e.Oid?.
Value
, StringComparison.Ordinal));
153
.Where(e => string.Equals(AspNetHttpsOid, e.Oid?.
Value
, StringComparison.Ordinal))
Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests (6)
CertificateManagerTests.cs (6)
62
Assert.Equal("1.2.840.113549.1.1.11", httpsCertificate.SignatureAlgorithm.
Value
);
85
keyUsage.
Value
== "1.3.6.1.5.5.7.3.1");
91
e.Oid.
Value
== "2.5.29.17");
97
e.Oid.
Value
== CertificateManager.AspNetHttpsOid &&
477
e.Oid.
Value
== CertificateManager.AspNetHttpsOid &&
483
e.Oid.
Value
== CertificateManager.AspNetHttpsOid &&
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
src\Grpc\JsonTranscoding\src\Shared\X509CertificateHelpers.cs (1)
38
if (ext.Oid?.
Value
== X509SubjectAlternativeNameConstants.Oid)
Microsoft.AspNetCore.Server.Kestrel.Core (6)
CertificateLoader.cs (1)
96
if (string.Equals(oid.
Value
, ServerAuthenticationOid, StringComparison.Ordinal))
Internal\Certificates\CertificateConfigLoader.cs (2)
101
switch (certificate.PublicKey.Oid.
Value
)
146
throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, CoreStrings.UnrecognizedCertificateKeyOid, certificate.PublicKey.Oid.
Value
));
src\Shared\CertificateGeneration\CertificateManager.cs (3)
73
if (string.Equals(AspNetHttpsOid, extension.Oid?.
Value
, StringComparison.Ordinal))
148
.Any(e => string.Equals(oid, e.Oid?.
Value
, StringComparison.Ordinal));
153
.Where(e => string.Equals(AspNetHttpsOid, e.Oid?.
Value
, StringComparison.Ordinal))
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (1)
449
writer.WriteObjectIdentifier(akidExtension.Oid.
Value
);
Microsoft.DotNet.SignCheckLibrary (8)
Verification\AuthentiCode.cs (6)
75
if (String.Equals(rfc3161Message.ContentInfo.ContentType.
Value
, WinCrypt.szOID_TIMESTAMP_TOKEN, StringComparison.OrdinalIgnoreCase))
153
if (String.Equals(unsignedAttribute.Oid.
Value
, WinCrypt.szOID_RSA_counterSign, StringComparison.OrdinalIgnoreCase))
159
if (String.Equals(signedAttribute.Oid.
Value
, WinCrypt.szOID_RSA_signingTime, StringComparison.OrdinalIgnoreCase))
177
else if (String.Equals(unsignedAttribute.Oid.
Value
, WinCrypt.szOID_RFC3161_counterSign, StringComparison.OrdinalIgnoreCase))
181
else if (String.Equals(unsignedAttribute.Oid.
Value
, WinCrypt.szOID_NESTED_SIGNATURE, StringComparison.OrdinalIgnoreCase))
191
if (String.Equals(nestedUnsignedAttribute.Oid.
Value
, WinCrypt.szOID_RFC3161_counterSign, StringComparison.OrdinalIgnoreCase))
Verification\Jar\JarSignatureFile.cs (2)
259
if (String.Equals(unsignedAttribute.Oid.
Value
, WinCrypt.szOID_SIGNATURE_TIMESTAMP_ATTRIBUTE, StringComparison.OrdinalIgnoreCase))
270
if (String.Equals(sa.Oid.
Value
, WinCrypt.szOID_RSA_signingTime, StringComparison.OrdinalIgnoreCase))
System.Net.Http (1)
src\libraries\Common\src\System\Net\Security\CertificateHelper.cs (1)
93
if (oid.
Value
== ClientAuthenticationOID)
System.Net.Security (2)
System\Net\Security\Pal.Managed\EndpointChannelBindingToken.cs (2)
31
switch (signatureAlgorithm.
Value
)
56
throw new ArgumentException(signatureAlgorithm.
Value
);
System.Security.Cryptography (82)
src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (2)
50
AttrType = attributeObject.Oid!.
Value
!,
332
return oid.
Value
switch
src\libraries\Common\src\System\Security\Cryptography\Asn1\AttributeAsn.manual.cs (1)
19
AttrType = attribute.Oid!.
Value
!;
src\libraries\Common\src\System\Security\Cryptography\Asn1\X509ExtensionAsn.manual.cs (1)
21
ExtnId = extension.Oid!.
Value
!;
src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObject.cs (4)
43
if (!string.Equals(asn.Oid.
Value
, oid.
Value
, StringComparison.Ordinal))
45
throw new InvalidOperationException(SR.Format(SR.InvalidOperation_WrongOidInAsnCollection, oid.
Value
, asn.Oid.
Value
));
src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObjectCollection.cs (2)
52
string? szOid1 = attribute.Oid.
Value
;
62
string? szOid2 = existing.Oid.
Value
;
src\libraries\Common\src\System\Security\Cryptography\EccKeyFormatHelper.cs (2)
536
if (string.IsNullOrEmpty(oid.
Value
))
542
writer.WriteObjectIdentifier(oid.
Value
!);
src\libraries\Common\src\System\Security\Cryptography\ECOpenSsl.cs (2)
70
string oid = !string.IsNullOrEmpty(curve.Oid.
Value
) ? curve.Oid.
Value
: curve.Oid.FriendlyName!;
src\libraries\Common\src\System\Security\Cryptography\ECOpenSsl.ImportExport.cs (2)
112
string oid = !string.IsNullOrEmpty(parameters.Curve.Oid.
Value
) ?
113
parameters.Curve.Oid.
Value
: parameters.Curve.Oid.FriendlyName!;
src\libraries\Common\src\System\Security\Cryptography\Oids.Shared.cs (3)
175
return oid.
Value
is not null && oid.
Value
.Equals(other.
Value
);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12CertBag.cs (2)
97
if (certificateType.
Value
== null)
100
return EncodeBagValue(certificateType.
Value
, encodedCertificate);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SecretBag.cs (2)
52
Debug.Assert(secretTypeOid != null && secretTypeOid.
Value
!= null);
56
SecretTypeId = secretTypeOid.
Value
,
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9AttributeObject.cs (1)
41
string? szOid = base.Oid!.
Value
;
System\Security\Cryptography\CryptoConfig.cs (1)
538
oidName = oid.
Value
;
System\Security\Cryptography\ECCurve.cs (4)
80
if (string.IsNullOrEmpty(value.
Value
) && string.IsNullOrEmpty(value.FriendlyName))
81
throw new ArgumentException(SR.Format(SR.Cryptography_InvalidCurveOid, value.
Value
));
193
(string.IsNullOrEmpty(Oid.FriendlyName) && string.IsNullOrEmpty(Oid.
Value
)))
195
throw new CryptographicException(SR.Format(SR.Cryptography_InvalidCurveOid, Oid?.
Value
));
System\Security\Cryptography\Helpers.cs (2)
210
return aCurve.Oid.
Value
== bCurve.Oid.
Value
&&
System\Security\Cryptography\OidCollection.cs (1)
59
if (entry.
Value
== oidValue)
System\Security\Cryptography\OpenSslAsnFormatter.cs (2)
14
if (oid == null || string.IsNullOrEmpty(oid.
Value
))
26
using (SafeAsn1ObjectHandle asnOid = Interop.Crypto.ObjTxt2Obj(oid.
Value
))
System\Security\Cryptography\X509Certificates\CertificateExtensionsCommon.cs (2)
21
if (oidValue != algorithmOid.
Value
)
54
if (!certificate.HasPrivateKey || oidValue != certificate.PublicKey.Oid.
Value
)
System\Security\Cryptography\X509Certificates\CertificatePolicy.cs (2)
66
string nextOid = policyOid.
Value
!;
125
string oidToCheck = policyOid.
Value
!;
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (10)
355
if (attr.Oid is null || attr.Oid.
Value
is null)
361
if (attr.Oid.
Value
== Oids.Pkcs9ExtensionRequest)
367
attributes[attrCount] = new X501Attribute(attr.Oid.
Value
, attr.RawData);
640
if (issuerCertificate.PublicKey.Oid.
Value
!= PublicKey.Oid.
Value
)
645
issuerCertificate.PublicKey.Oid.
Value
,
646
PublicKey.Oid.
Value
),
840
Algorithm = PublicKey.Oid!.
Value
!,
861
if (!usedOids.Add(extension.Oid!.
Value
))
864
SR.Format(SR.Cryptography_CertReq_DuplicateExtension, extension.Oid.
Value
));
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Build.cs (1)
398
writer.WriteObjectIdentifier(authorityKeyIdentifier.Oid!.
Value
!);
System\Security\Cryptography\X509Certificates\ECDsaCertificateExtensions.cs (1)
57
if (extension.Oid!.
Value
== Oids.KeyUsage)
System\Security\Cryptography\X509Certificates\ECDsaX509SignatureGenerator.cs (2)
78
string? curveOid = ecParameters.Curve.Oid.
Value
;
92
_ => new Oid(friendlyName).
Value
,
System\Security\Cryptography\X509Certificates\ManagedCertificateFinder.cs (4)
31
if (!StringComparer.OrdinalIgnoreCase.Equals(oid.
Value
, maybeOid))
33
return oid.
Value
!;
212
if (StringComparer.Ordinal.Equals(oidValue, usageOid.
Value
))
325
StringComparer.Ordinal.Equals(extensionOid, ext.Oid.
Value
))
System\Security\Cryptography\X509Certificates\OpenSslX509Encoder.cs (1)
33
switch (oid.
Value
)
System\Security\Cryptography\X509Certificates\Pkcs10CertificationRequestInfo.cs (1)
55
spki.Algorithm = new AlgorithmIdentifierAsn { Algorithm = PublicKey.Oid!.
Value
!, Parameters = PublicKey.EncodedParameters.RawData };
System\Security\Cryptography\X509Certificates\PublicKey.cs (6)
82
switch (_oid.
Value
)
168
if (_oid.
Value
!= Oids.Rsa)
199
if (_oid.
Value
!= Oids.Dsa)
228
if (_oid.
Value
!= Oids.EcPublicKey)
258
if (_oid.
Value
!= Oids.EcPublicKey)
281
Algorithm = _oid.
Value
?? string.Empty,
System\Security\Cryptography\X509Certificates\X500DistinguishedNameBuilder.cs (2)
100
ArgumentException.ThrowIfNullOrEmpty(oid.
Value
);
103
EncodeComponent(oid.
Value
, value, tag);
System\Security\Cryptography\X509Certificates\X500NameEncoder.cs (2)
164
decodedName.Append(oid.
Value
);
489
return new Oid(str.ToString()).
Value
; // Value can be null, but permit the null-to-empty conversion.
System\Security\Cryptography\X509Certificates\X509AuthorityInformationAccessExtension.cs (3)
161
/// The <see cref="Oid.
Value
"/> property of the <paramref name="accessMethodOid"/> parameter is
172
ArgumentException.ThrowIfNullOrEmpty(accessMethodOid.
Value
);
174
return EnumerateUris(accessMethodOid.
Value
);
System\Security\Cryptography\X509Certificates\X509BasicConstraintsExtension.cs (1)
122
if (Oid!.
Value
== Oids.BasicConstraints)
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (5)
553
sb.Append(SignatureAlgorithm.
Value
);
618
sb.Append(extension.Oid.
Value
);
1285
if (extension.Oid!.
Value
== Oids.SubjectAltName)
1494
CreateCustomExtensionIfAny(oid.
Value
);
1514
if (extension.Oid?.
Value
== Oids.KeyUsage && extension is X509KeyUsageExtension ext)
System\Security\Cryptography\X509Certificates\X509EnhancedKeyUsageExtension.cs (1)
73
writer.WriteObjectIdentifierForCrypto(usage.
Value
!);
System\Security\Cryptography\X509Certificates\X509Extension.cs (2)
41
ArgumentException.ThrowIfNullOrEmpty(base.Oid?.
Value
, "oid.Value");
71
ArgumentException.ThrowIfNullOrEmpty(base.Oid?.
Value
, "oid.Value");
System\Security\Cryptography\X509Certificates\X509ExtensionCollection.cs (2)
54
string? oidValue = new Oid(oid).
Value
;
57
if (string.Equals(extension.Oid!.
Value
, oidValue, StringComparison.OrdinalIgnoreCase))
System.Security.Cryptography.Pkcs (47)
Internal\Cryptography\Pal\AnyOS\ManagedPal.cs (1)
140
SymmetricAlgorithm alg = OpenAlgorithm(algorithmIdentifier.Oid.
Value
!);
Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs (3)
67
ContentType = contentInfo.ContentType.
Value
!,
71
Algorithm = contentEncryptionAlgorithm.Oid.
Value
!,
174
if (contentInfo.ContentType.
Value
== Oids.Pkcs7Data || contentInfo.Content.Length == 0)
Internal\Cryptography\PkcsHelpers.cs (1)
33
return GetDigestAlgorithm(oid.
Value
);
src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (2)
50
AttrType = attributeObject.Oid!.
Value
!,
332
return oid.
Value
switch
src\libraries\Common\src\System\Security\Cryptography\Asn1\AttributeAsn.manual.cs (1)
19
AttrType = attribute.Oid!.
Value
!;
src\libraries\Common\src\System\Security\Cryptography\Asn1\X509ExtensionAsn.manual.cs (1)
21
ExtnId = extension.Oid!.
Value
!;
src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObject.cs (4)
43
if (!string.Equals(asn.Oid.
Value
, oid.
Value
, StringComparison.Ordinal))
45
throw new InvalidOperationException(SR.Format(SR.InvalidOperation_WrongOidInAsnCollection, oid.
Value
, asn.Oid.
Value
));
src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObjectCollection.cs (2)
52
string? szOid1 = attribute.Oid.
Value
;
62
string? szOid2 = existing.Oid.
Value
;
src\libraries\Common\src\System\Security\Cryptography\Oids.Shared.cs (3)
175
return oid.
Value
is not null && oid.
Value
.Equals(other.
Value
);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12CertBag.cs (2)
97
if (certificateType.
Value
== null)
100
return EncodeBagValue(certificateType.
Value
, encodedCertificate);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SecretBag.cs (2)
52
Debug.Assert(secretTypeOid != null && secretTypeOid.
Value
!= null);
56
SecretTypeId = secretTypeOid.
Value
,
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9AttributeObject.cs (1)
41
string? szOid = base.Oid!.
Value
;
System\Security\Cryptography\Pkcs\CmsSigner.cs (1)
185
newSignerInfo.DigestAlgorithm.Algorithm = DigestAlgorithm.
Value
!;
System\Security\Cryptography\Pkcs\Pkcs8PrivateKeyInfo.cs (1)
253
Algorithm = AlgorithmId.
Value
!,
System\Security\Cryptography\Pkcs\Rfc3161TimestampRequest.cs (3)
306
Algorithm = hashAlgorithmId.
Value
!,
312
ReqPolicy = requestedPolicyId?.
Value
,
395
if (!token.VerifyHash(GetMessageHash().Span, HashAlgorithmId.
Value
))
System\Security\Cryptography\Pkcs\Rfc3161TimestampToken.cs (9)
141
if (VerifyHash(hash, hashAlgorithmId.
Value
))
174
hashAlgorithmId == TokenInfo.HashAlgorithmId.
Value
;
191
return VerifyHash(stackSpan.Slice(0, bytesWritten), hashAlgorithmId.
Value
);
197
$"TryGetHashAndReset did not fit in {stackSpan.Length} for hash {hashAlgorithmId.
Value
}");
199
return VerifyHash(hasher.GetHashAndReset(), hashAlgorithmId.
Value
);
268
if (oid.
Value
== Oids.TimeStampingPurpose)
338
if (cms.ContentInfo.ContentType.
Value
!= Oids.TstInfo)
581
string? setOid = attrSet.Oid?.
Value
;
592
string? attrOid = attr.Oid?.
Value
;
System\Security\Cryptography\Pkcs\Rfc3161TimestampTokenInfo.cs (2)
339
Policy = policyId.
Value
!,
344
Algorithm = hashAlgorithmId.
Value
!,
System\Security\Cryptography\Pkcs\SignedCms.cs (2)
346
string contentType = _contentType ?? ContentInfo.ContentType.
Value
?? Oids.Pkcs7Data;
497
if ((_contentType ?? ContentInfo.ContentType.
Value
) != Oids.Pkcs7Data)
System\Security\Cryptography\Pkcs\SignerInfo.cs (6)
689
SignatureAlgorithm.
Value
!,
695
throw new CryptographicException(SR.Cryptography_Cms_UnknownAlgorithm, SignatureAlgorithm.
Value
);
739
if (ext.Oid!.
Value
== Oids.KeyUsage)
791
DigestAlgorithm.
Value
,
800
return PkcsHelpers.GetDigestAlgorithm(DigestAlgorithm.
Value
!, forVerification: true);
809
if (attributes[i].AttrType == oid.
Value
)
System.Security.Cryptography.Xml (2)
System\Security\Cryptography\Xml\SignedXml.cs (1)
346
if (string.Equals(extension.Oid!.
Value
, "2.5.29.15" /* szOID_KEY_USAGE */, StringComparison.OrdinalIgnoreCase))
System\Security\Cryptography\Xml\SignedXmlDebugLog.cs (1)
269
friendlyName = oid.
Value
;
Templates.Blazor.Tests (3)
src\Shared\CertificateGeneration\CertificateManager.cs (3)
73
if (string.Equals(AspNetHttpsOid, extension.Oid?.
Value
, StringComparison.Ordinal))
148
.Any(e => string.Equals(oid, e.Oid?.
Value
, StringComparison.Ordinal));
153
.Where(e => string.Equals(AspNetHttpsOid, e.Oid?.
Value
, StringComparison.Ordinal))
Templates.Blazor.WebAssembly.Auth.Tests (3)
src\Shared\CertificateGeneration\CertificateManager.cs (3)
73
if (string.Equals(AspNetHttpsOid, extension.Oid?.
Value
, StringComparison.Ordinal))
148
.Any(e => string.Equals(oid, e.Oid?.
Value
, StringComparison.Ordinal));
153
.Where(e => string.Equals(AspNetHttpsOid, e.Oid?.
Value
, StringComparison.Ordinal))
Templates.Blazor.WebAssembly.Tests (3)
src\Shared\CertificateGeneration\CertificateManager.cs (3)
73
if (string.Equals(AspNetHttpsOid, extension.Oid?.
Value
, StringComparison.Ordinal))
148
.Any(e => string.Equals(oid, e.Oid?.
Value
, StringComparison.Ordinal));
153
.Where(e => string.Equals(AspNetHttpsOid, e.Oid?.
Value
, StringComparison.Ordinal))
Templates.Mvc.Tests (3)
src\Shared\CertificateGeneration\CertificateManager.cs (3)
73
if (string.Equals(AspNetHttpsOid, extension.Oid?.
Value
, StringComparison.Ordinal))
148
.Any(e => string.Equals(oid, e.Oid?.
Value
, StringComparison.Ordinal));
153
.Where(e => string.Equals(AspNetHttpsOid, e.Oid?.
Value
, StringComparison.Ordinal))
Templates.Tests (3)
src\Shared\CertificateGeneration\CertificateManager.cs (3)
73
if (string.Equals(AspNetHttpsOid, extension.Oid?.
Value
, StringComparison.Ordinal))
148
.Any(e => string.Equals(oid, e.Oid?.
Value
, StringComparison.Ordinal));
153
.Where(e => string.Equals(AspNetHttpsOid, e.Oid?.
Value
, StringComparison.Ordinal))