Skip to content

Commit a2d8f59

Browse files
committed
Overload AddObject for Asn1Object
1 parent ff2c662 commit a2d8f59

File tree

4 files changed

+26
-6
lines changed

4 files changed

+26
-6
lines changed

crypto/src/asn1/ASN1Generator.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ protected Stream Out
2020

2121
public abstract void AddObject(Asn1Encodable obj);
2222

23-
public abstract Stream GetRawOutputStream();
23+
public abstract void AddObject(Asn1Object obj);
24+
25+
public abstract Stream GetRawOutputStream();
2426

2527
public abstract void Close();
2628
}

crypto/src/asn1/BERGenerator.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Org.BouncyCastle.Asn1
66
{
7-
public class BerGenerator
7+
public abstract class BerGenerator
88
: Asn1Generator
99
{
1010
private bool _tagged = false;
@@ -17,7 +17,7 @@ protected BerGenerator(
1717
{
1818
}
1919

20-
public BerGenerator(
20+
protected BerGenerator(
2121
Stream outStream,
2222
int tagNo,
2323
bool isExplicit)
@@ -34,7 +34,13 @@ public override void AddObject(
3434
new BerOutputStream(Out).WriteObject(obj);
3535
}
3636

37-
public override Stream GetRawOutputStream()
37+
public override void AddObject(
38+
Asn1Object obj)
39+
{
40+
new BerOutputStream(Out).WriteObject(obj);
41+
}
42+
43+
public override Stream GetRawOutputStream()
3844
{
3945
return Out;
4046
}

crypto/src/asn1/DERSequenceGenerator.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ public override void AddObject(
2727
new DerOutputStream(_bOut).WriteObject(obj);
2828
}
2929

30-
public override Stream GetRawOutputStream()
30+
public override void AddObject(
31+
Asn1Object obj)
32+
{
33+
new DerOutputStream(_bOut).WriteObject(obj);
34+
}
35+
36+
public override Stream GetRawOutputStream()
3137
{
3238
return _bOut;
3339
}

crypto/src/asn1/DERSetGenerator.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ public override void AddObject(
2727
new DerOutputStream(_bOut).WriteObject(obj);
2828
}
2929

30-
public override Stream GetRawOutputStream()
30+
public override void AddObject(
31+
Asn1Object obj)
32+
{
33+
new DerOutputStream(_bOut).WriteObject(obj);
34+
}
35+
36+
public override Stream GetRawOutputStream()
3137
{
3238
return _bOut;
3339
}

0 commit comments

Comments
 (0)