File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,10 @@ internal static SslServerAuthenticationOptions CloneSslOptions(SslServerAuthenti
200200 ServerCertificateSelectionCallback = sslOptions . ServerCertificateSelectionCallback ,
201201 CertificateChainPolicy = sslOptions . CertificateChainPolicy ,
202202 AllowTlsResume = sslOptions . AllowTlsResume ,
203+ #pragma warning disable CA1416 // Ignore SupportedOSPlatform checks, we're just copying the value
204+ AllowRsaPssPadding = sslOptions . AllowRsaPssPadding ,
205+ AllowRsaPkcs1Padding = sslOptions . AllowRsaPkcs1Padding ,
206+ #pragma warning restore CA1416
203207 } ;
204208
205209 private sealed class SniOptions
Original file line number Diff line number Diff line change @@ -858,6 +858,12 @@ public void CloneSslOptionsClonesAllProperties()
858858 CertificateChainPolicy = new X509ChainPolicy ( ) ,
859859 // Defaults to true
860860 AllowTlsResume = false ,
861+ #pragma warning disable CA1416
862+ // Defaults to true
863+ AllowRsaPssPadding = false ,
864+ // Defaults to true
865+ AllowRsaPkcs1Padding = false ,
866+ #pragma warning restore CA1416
861867 } ;
862868
863869 var clonedOptions = SniOptionsSelector . CloneSslOptions ( options ) ;
@@ -906,6 +912,12 @@ public void CloneSslOptionsClonesAllProperties()
906912 Assert . Equal ( options . AllowTlsResume , clonedOptions . AllowTlsResume ) ;
907913 Assert . True ( propertyNames . Remove ( nameof ( options . AllowTlsResume ) ) ) ;
908914
915+ Assert . Equal ( options . AllowRsaPssPadding , clonedOptions . AllowRsaPssPadding ) ;
916+ Assert . True ( propertyNames . Remove ( nameof ( options . AllowRsaPssPadding ) ) ) ;
917+
918+ Assert . Equal ( options . AllowRsaPkcs1Padding , clonedOptions . AllowRsaPkcs1Padding ) ;
919+ Assert . True ( propertyNames . Remove ( nameof ( options . AllowRsaPkcs1Padding ) ) ) ;
920+
909921 // Ensure we've checked every property. When new properties get added, we'll have to update this test along with the CloneSslOptions implementation.
910922 Assert . Empty ( propertyNames ) ;
911923 }
You can’t perform that action at this time.
0 commit comments