Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Suppress warnings in DataProtection
Tracked with #47695
  • Loading branch information
eerhardt committed Apr 13, 2023
commit 896bd02201f6e57a0df854a10b0ee400c5da44f1
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<linker>
<assembly fullname="Microsoft.AspNetCore.DataProtection, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60">
<assembly fullname="Microsoft.AspNetCore.DataProtection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60">
<attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
<argument>ILLink</argument>
<argument>IL2026</argument>
<property name="Scope">member</property>
<property name="Target">M:Microsoft.AspNetCore.DataProtection.Internal.DataProtectionHostedService.StartAsync(System.Threading.CancellationToken)</property>
<property name="Target">M:Microsoft.AspNetCore.DataProtection.XmlEncryption.CertificateXmlEncryptor.EncryptElement(System.Xml.Linq.XElement)</property>
</attribute>
<attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
<argument>ILLink</argument>
<argument>IL2026</argument>
<property name="Scope">member</property>
<property name="Target">M:Microsoft.AspNetCore.DataProtection.Internal.KeyManagementOptionsSetup.Configure(Microsoft.AspNetCore.DataProtection.KeyManagement.KeyManagementOptions)</property>
<property name="Target">M:Microsoft.AspNetCore.DataProtection.XmlEncryption.EncryptedXmlDecryptor.EncryptedXmlWithCertificateKeys.#ctor(Microsoft.AspNetCore.DataProtection.XmlEncryption.XmlKeyDecryptionOptions,System.Xml.XmlDocument)</property>
</attribute>
</assembly>
</linker>
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ private XElement EncryptElement(XElement plaintextElement)
var elementToEncrypt = (XmlElement)xmlDocument.DocumentElement!.FirstChild!;

// Perform the encryption and update the document in-place.
#pragma warning disable IL2026 // TODO: https://github.com/dotnet/aspnetcore/issues/47695
var encryptedXml = new EncryptedXml(xmlDocument);
#pragma warning restore IL2026
var encryptedData = _encryptor.PerformEncryption(encryptedXml, elementToEncrypt);
EncryptedXml.ReplaceElement(elementToEncrypt, encryptedData, content: false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ private sealed class EncryptedXmlWithCertificateKeys : EncryptedXml

[RequiresDynamicCode("XmlDsigXsltTransform uses XslCompiledTransform which requires dynamic code.")]
public EncryptedXmlWithCertificateKeys(XmlKeyDecryptionOptions? options, XmlDocument document)
#pragma warning disable IL2026 // TODO: https://github.com/dotnet/aspnetcore/issues/47695
: base(document)
#pragma warning restore IL2026
{
_options = options;
}
Expand Down