File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -385,7 +385,7 @@ private void SetCreationTime()
385
385
386
386
public static SignaturePacket FromByteArray ( byte [ ] data )
387
387
{
388
- BcpgInputStream input = BcpgInputStream . Wrap ( new MemoryStream ( data ) ) ;
388
+ BcpgInputStream input = BcpgInputStream . Wrap ( new MemoryStream ( data , writable : false ) ) ;
389
389
390
390
return new SignaturePacket ( input ) ;
391
391
}
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ private PgpSecretKeyRing(
36
36
37
37
public PgpSecretKeyRing (
38
38
byte [ ] encoding )
39
- : this ( new MemoryStream ( encoding ) )
39
+ : this ( new MemoryStream ( encoding , writable : false ) )
40
40
{
41
41
}
42
42
Original file line number Diff line number Diff line change @@ -981,7 +981,7 @@ public static IList<ProtocolName> ReadAlpnExtensionClient(byte[] extensionData)
981
981
if ( extensionData == null )
982
982
throw new ArgumentNullException ( nameof ( extensionData ) ) ;
983
983
984
- MemoryStream buf = new MemoryStream ( extensionData ) ;
984
+ MemoryStream buf = new MemoryStream ( extensionData , writable : false ) ;
985
985
986
986
int length = TlsUtilities . ReadUint16 ( buf ) ;
987
987
if ( length != ( extensionData . Length - 2 ) )
@@ -1015,7 +1015,7 @@ public static IList<X509Name> ReadCertificateAuthoritiesExtension(byte[] extensi
1015
1015
if ( extensionData . Length < 5 )
1016
1016
throw new TlsFatalAlert ( AlertDescription . decode_error ) ;
1017
1017
1018
- MemoryStream buf = new MemoryStream ( extensionData ) ;
1018
+ MemoryStream buf = new MemoryStream ( extensionData , writable : false ) ;
1019
1019
1020
1020
int length = TlsUtilities . ReadUint16 ( buf ) ;
1021
1021
if ( length != ( extensionData . Length - 2 ) )
You can’t perform that action at this time.
0 commit comments