diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-07-22 11:55:15 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-07-22 11:55:15 +0700 |
commit | d0c09ebad8713c772d7dc280f86234270cf99616 (patch) | |
tree | 1b5226f6b4296f18d0024141b41cf6398df93487 /crypto | |
parent | BMA-105 (diff) | |
download | BouncyCastle.NET-ed25519-d0c09ebad8713c772d7dc280f86234270cf99616.tar.xz |
Port of encoding fix from Java
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/src/crypto/tls/CertificateRequest.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/crypto/tls/CertificateRequest.cs b/crypto/src/crypto/tls/CertificateRequest.cs index 8ab265513..100398ffb 100644 --- a/crypto/src/crypto/tls/CertificateRequest.cs +++ b/crypto/src/crypto/tls/CertificateRequest.cs @@ -100,7 +100,7 @@ namespace Org.BouncyCastle.Crypto.Tls { byte[] derEncoding = certificateAuthority.GetEncoded(Asn1Encodable.Der); derEncodings.Add(derEncoding); - totalLength += derEncoding.Length; + totalLength += derEncoding.Length + 2; } TlsUtilities.CheckUint16(totalLength); @@ -108,7 +108,7 @@ namespace Org.BouncyCastle.Crypto.Tls foreach (byte[] derEncoding in derEncodings) { - output.Write(derEncoding, 0, derEncoding.Length); + TlsUtilities.WriteOpaque16(derEncoding, output); } } } |