Skip to content

Silence deprecation warnings #611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions crypto/src/asn1/Asn1Exception.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ public Asn1Exception(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected Asn1Exception(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
6 changes: 6 additions & 0 deletions crypto/src/asn1/Asn1ParsingException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ public Asn1ParsingException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected Asn1ParsingException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
6 changes: 6 additions & 0 deletions crypto/src/bcpg/UnsupportedPacketVersionException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ public UnsupportedPacketVersionException(string message, Exception innerExceptio
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected UnsupportedPacketVersionException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
8 changes: 7 additions & 1 deletion crypto/src/cmp/CmpException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ public CmpException(string message, Exception innerException)
{
}

protected CmpException(SerializationInfo info, StreamingContext context)
#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected CmpException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
Expand Down
8 changes: 7 additions & 1 deletion crypto/src/cms/CMSAttributeTableGenerationException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ public CmsAttributeTableGenerationException(string message, Exception innerExcep
{
}

protected CmsAttributeTableGenerationException(SerializationInfo info, StreamingContext context)
#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected CmsAttributeTableGenerationException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
Expand Down
6 changes: 6 additions & 0 deletions crypto/src/cms/CMSException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ public CmsException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected CmsException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
6 changes: 6 additions & 0 deletions crypto/src/cms/CMSStreamException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ public CmsStreamException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected CmsStreamException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
6 changes: 6 additions & 0 deletions crypto/src/crmf/CrmfException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ public CrmfException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected CrmfException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
6 changes: 6 additions & 0 deletions crypto/src/crypto/CryptoException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ public CryptoException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected CryptoException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
6 changes: 6 additions & 0 deletions crypto/src/crypto/DataLengthException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ public DataLengthException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected DataLengthException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
6 changes: 6 additions & 0 deletions crypto/src/crypto/InvalidCipherTextException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ public InvalidCipherTextException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected InvalidCipherTextException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
6 changes: 6 additions & 0 deletions crypto/src/crypto/MaxBytesExceededException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ public MaxBytesExceededException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected MaxBytesExceededException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
6 changes: 6 additions & 0 deletions crypto/src/crypto/OutputLengthException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ public OutputLengthException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected OutputLengthException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
6 changes: 6 additions & 0 deletions crypto/src/ocsp/OCSPException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ public OcspException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected OcspException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
6 changes: 6 additions & 0 deletions crypto/src/openpgp/PgpDataValidationException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ public PgpDataValidationException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected PgpDataValidationException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
6 changes: 6 additions & 0 deletions crypto/src/openpgp/PgpException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ public PgpException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected PgpException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
6 changes: 6 additions & 0 deletions crypto/src/openpgp/PgpKeyValidationException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ public PgpKeyValidationException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected PgpKeyValidationException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
6 changes: 6 additions & 0 deletions crypto/src/openssl/EncryptionException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ public EncryptionException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected EncryptionException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
6 changes: 6 additions & 0 deletions crypto/src/openssl/PEMException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ public PemException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected PemException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
6 changes: 6 additions & 0 deletions crypto/src/openssl/PasswordException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ public PasswordException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected PasswordException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
6 changes: 6 additions & 0 deletions crypto/src/pkcs/PkcsException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ public PkcsException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected PkcsException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
6 changes: 6 additions & 0 deletions crypto/src/pkcs/PkcsIOException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ public PkcsIOException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected PkcsIOException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
6 changes: 6 additions & 0 deletions crypto/src/pkix/PkixCertPathBuilderException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ public PkixCertPathBuilderException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected PkixCertPathBuilderException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
9 changes: 9 additions & 0 deletions crypto/src/pkix/PkixCertPathValidatorException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,21 @@ public PkixCertPathValidatorException(string message, Exception innerException,
m_index = index;
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected PkixCertPathValidatorException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
m_index = info.GetInt32("index");
}

#if NET8_0_OR_GREATER
[Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
#endif
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
Expand Down
6 changes: 6 additions & 0 deletions crypto/src/pkix/PkixNameConstraintValidatorException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ public PkixNameConstraintValidatorException(string message, Exception innerExcep
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected PkixNameConstraintValidatorException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
6 changes: 6 additions & 0 deletions crypto/src/pqc/crypto/lms/LMSException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ public LmsException(string message, Exception innerException)
{
}

#if NET8_0_OR_GREATER
[System.Obsolete(
"This API supports obsolete formatter-based serialization. It should not be called or extended by application code.",
DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}"
)]
#endif
protected LmsException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
Expand Down
Loading