File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,30 @@ internal SignerInformation(
84
84
this . digestCalculator = digestCalculator ;
85
85
}
86
86
87
+ /**
88
+ * Protected constructor. In some cases clients have their own idea about how to encode
89
+ * the signed attributes and calculate the signature. This constructor is to allow developers
90
+ * to deal with that by extending off the class and overridng methods like getSignedAttributes().
91
+ *
92
+ * @param baseInfo the SignerInformation to base this one on.
93
+ */
94
+ protected SignerInformation ( SignerInformation baseInfo )
95
+ {
96
+ this . info = baseInfo . info ;
97
+ this . contentType = baseInfo . contentType ;
98
+ this . isCounterSignature = baseInfo . IsCounterSignature ;
99
+ this . sid = baseInfo . SignerID ;
100
+ this . digestAlgorithm = info . DigestAlgorithm ;
101
+ this . signedAttributeSet = info . AuthenticatedAttributes ;
102
+ this . unsignedAttributeSet = info . UnauthenticatedAttributes ;
103
+ this . encryptionAlgorithm = info . DigestEncryptionAlgorithm ;
104
+ this . signature = info . EncryptedDigest . GetOctets ( ) ;
105
+ this . content = baseInfo . content ;
106
+ this . resultDigest = baseInfo . resultDigest ;
107
+ this . signedAttributeTable = baseInfo . signedAttributeTable ;
108
+ this . unsignedAttributeTable = baseInfo . unsignedAttributeTable ;
109
+ }
110
+
87
111
public bool IsCounterSignature
88
112
{
89
113
get { return isCounterSignature ; }
You can’t perform that action at this time.
0 commit comments