You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SignedXml: drop .NET 12 InvalidOperationException documentation (#13054)
The dotnet/runtime PR that would have thrown InvalidOperationException on SignedXml instance reuse in .NET 12 (dotnet/runtime#132836) has been closed and is not going to ship. Remove the 10 <exception cref="T:System.InvalidOperationException"> entries added across ComputeSignature, CheckSignature, CheckSignatureReturningKey, LoadXml, AddReference, and AddObject, and drop the .NET 12-specific sentence from the `Instances are single-use` remarks section. The general guidance that a SignedXml instance is not intended to be reused across multiple signing or verification operations remains correct and stays.
Copy file name to clipboardExpand all lines: xml/System.Security.Cryptography.Xml/SignedXml.xml
+1-12Lines changed: 1 addition & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -190,7 +190,7 @@ Given the risks of external references, <xref:System.Security.Cryptography.Xml.S
190
190
191
191
## Instances are single-use
192
192
193
-
A <xref:System.Security.Cryptography.Xml.SignedXml> instance is not intended to be reused across multiple signing or verification operations. Starting in .NET 12, calling <xref:System.Security.Cryptography.Xml.SignedXml.ComputeSignature*> or <xref:System.Security.Cryptography.Xml.SignedXml.CheckSignature*> more than once on the same instance, or calling <xref:System.Security.Cryptography.Xml.SignedXml.LoadXml*>, <xref:System.Security.Cryptography.Xml.SignedXml.AddReference*>, or <xref:System.Security.Cryptography.Xml.SignedXml.AddObject*> after a call to <xref:System.Security.Cryptography.Xml.SignedXml.ComputeSignature*> or <xref:System.Security.Cryptography.Xml.SignedXml.CheckSignature*> has begun on the same instance, throws <xref:System.InvalidOperationException>. This applies even if the earlier call itself threw an exception. Create a new <xref:System.Security.Cryptography.Xml.SignedXml> instance for each signing or verification operation.
193
+
A <xref:System.Security.Cryptography.Xml.SignedXml> instance is not intended to be reused across multiple signing or verification operations. Reusing an instance can produce incorrect results. Create a new <xref:System.Security.Cryptography.Xml.SignedXml> instance for each signing or verification operation.
194
194
195
195
]]></format>
196
196
</remarks>
@@ -447,7 +447,6 @@ The following code example shows how to sign and verify a single element of an X
447
447
448
448
]]></format>
449
449
</remarks>
450
-
<exceptioncref="T:System.InvalidOperationException">The <seecref="T:System.Security.Cryptography.Xml.SignedXml" /> instance has already been used to compute or verify a signature.</exception>
451
450
</Docs>
452
451
</Member>
453
452
<MemberMemberName="AddReference">
@@ -515,7 +514,6 @@ The following code example shows how to sign and verify a single element of an X
515
514
516
515
]]></format>
517
516
</remarks>
518
-
<exceptioncref="T:System.InvalidOperationException">The <seecref="T:System.Security.Cryptography.Xml.SignedXml" /> instance has already been used to compute or verify a signature.</exception>
519
517
</Docs>
520
518
</Member>
521
519
<MemberGroupMemberName="CheckSignature">
@@ -608,7 +606,6 @@ The following code example shows how to sign and verify a single element of an X
608
606
-or
609
607
610
608
The hash algorithm could not be created.</exception>
611
-
<exceptioncref="T:System.InvalidOperationException">The <seecref="T:System.Security.Cryptography.Xml.SignedXml" /> instance has already been used to compute or verify a signature.</exception>
612
609
</Docs>
613
610
</Member>
614
611
<MemberMemberName="CheckSignature">
@@ -674,7 +671,6 @@ The following code example shows how to sign and verify a single element of an X
674
671
-or
675
672
676
673
The hash algorithm could not be created.</exception>
677
-
<exceptioncref="T:System.InvalidOperationException">The <seecref="T:System.Security.Cryptography.Xml.SignedXml" /> instance has already been used to compute or verify a signature.</exception>
678
674
</Docs>
679
675
</Member>
680
676
<MemberMemberName="CheckSignature">
@@ -740,7 +736,6 @@ The following code example shows how to sign and verify a single element of an X
740
736
-or-
741
737
742
738
The cryptographic transform used to check the signature could not be created.</exception>
743
-
<exceptioncref="T:System.InvalidOperationException">The <seecref="T:System.Security.Cryptography.Xml.SignedXml" /> instance has already been used to compute or verify a signature.</exception>
744
739
</Docs>
745
740
</Member>
746
741
<MemberMemberName="CheckSignature">
@@ -803,7 +798,6 @@ The X.509 certificate is verified. The <xref:System.Security.Cryptography.Xml.Si
803
798
</remarks>
804
799
<exceptioncref="T:System.ArgumentNullException">The <paramrefname="certificate" /> parameter is <seelangword="null" />.</exception>
805
800
<exceptioncref="T:System.Security.Cryptography.CryptographicException">A signature description could not be created for the <paramrefname="certificate" /> parameter.</exception>
806
-
<exceptioncref="T:System.InvalidOperationException">The <seecref="T:System.Security.Cryptography.Xml.SignedXml" /> instance has already been used to compute or verify a signature.</exception>
807
801
</Docs>
808
802
</Member>
809
803
<MemberMemberName="CheckSignatureReturningKey">
@@ -877,7 +871,6 @@ The X.509 certificate is verified. The <xref:System.Security.Cryptography.Xml.Si
877
871
-or
878
872
879
873
The hash algorithm could not be created.</exception>
880
-
<exceptioncref="T:System.InvalidOperationException">The <seecref="T:System.Security.Cryptography.Xml.SignedXml" /> instance has already been used to compute or verify a signature.</exception>
881
874
</Docs>
882
875
</Member>
883
876
<MemberGroupMemberName="ComputeSignature">
@@ -955,7 +948,6 @@ The X.509 certificate is verified. The <xref:System.Security.Cryptography.Xml.Si
955
948
-or-
956
949
957
950
The key could not be loaded.</exception>
958
-
<exceptioncref="T:System.InvalidOperationException">The <seecref="T:System.Security.Cryptography.Xml.SignedXml" /> instance has already been used to compute or verify a signature.</exception>
959
951
</Docs>
960
952
</Member>
961
953
<MemberMemberName="ComputeSignature">
@@ -1026,7 +1018,6 @@ The X.509 certificate is verified. The <xref:System.Security.Cryptography.Xml.Si
1026
1018
-or-
1027
1019
1028
1020
The cryptographic transform used to check the signature could not be created.</exception>
1029
-
<exceptioncref="T:System.InvalidOperationException">The <seecref="T:System.Security.Cryptography.Xml.SignedXml" /> instance has already been used to compute or verify a signature.</exception>
1030
1021
</Docs>
1031
1022
</Member>
1032
1023
<MemberMemberName="EncryptedXml">
@@ -1331,7 +1322,6 @@ The X.509 certificate is verified. The <xref:System.Security.Cryptography.Xml.Si
1331
1322
-or-
1332
1323
1333
1324
The <paramrefname="value" /> parameter does not contain a valid <seecref="P:System.Security.Cryptography.Xml.SignedXml.SignedInfo" /> property.</exception>
1334
-
<exceptioncref="T:System.InvalidOperationException">The <seecref="T:System.Security.Cryptography.Xml.SignedXml" /> instance has already been used to compute or verify a signature.</exception>
1335
1325
</Docs>
1336
1326
</Member>
1337
1327
<MemberMemberName="m_signature">
@@ -3060,4 +3050,3 @@ The X.509 certificate is verified. The <xref:System.Security.Cryptography.Xml.Si
0 commit comments