Click here to Skip to main content
15,913,944 members
Home / Discussions / C#
   

C#

 
QuestionRead Class information in C# Pin
Abhijit Jana6-Dec-07 3:22
professionalAbhijit Jana6-Dec-07 3:22 
GeneralRe: Read Class information in C# Pin
Skippums6-Dec-07 3:52
Skippums6-Dec-07 3:52 
GeneralRe: Read Class information in C# Pin
Abhijit Jana6-Dec-07 17:21
professionalAbhijit Jana6-Dec-07 17:21 
GeneralRe: Read Class information in C# Pin
Ennis Ray Lynch, Jr.6-Dec-07 8:53
Ennis Ray Lynch, Jr.6-Dec-07 8:53 
GeneralUpdate MS Access Data Structure Pin
polishprogrammer6-Dec-07 3:16
polishprogrammer6-Dec-07 3:16 
GeneralRe: Update MS Access Data Structure Pin
led mike6-Dec-07 7:08
led mike6-Dec-07 7:08 
GeneralRe: Update MS Access Data Structure Pin
polishprogrammer6-Dec-07 9:34
polishprogrammer6-Dec-07 9:34 
QuestionHow to Counter Sign in various levels Pin
Member 36551006-Dec-07 3:03
Member 36551006-Dec-07 3:03 
Hello.

The MSDN says:
"This implementation of CMS/PKCS #7 supports only one level of countersignature. That is, a signature can be signed, which forms a countersignature, but that countersignature cannot be signed again."
( http://msdn2.microsoft.com/en-us/library/yeayfsh9.aspx[^] )

So, how do I, in C#, compute a CounterSignature of a CounterSignature, and add this new CounterSignature to the SignedCms ?

The RFC3852 says:
"11.4. Countersignature
The countersignature attribute type specifies one or more signatures
on the contents octets of the signature OCTET STRING in a SignerInfo
value of the signed-data. That is, the message digest is computed
over the octets comprising the value of the OCTET STRING, neither the
tag nor length octets are included. Thus, the countersignature
attribute type countersigns (signs in serial) another signature.

The countersignature attribute MUST be an unsigned attribute; it MUST
NOT be a signed attribute, an authenticated attribute, an
unauthenticated attribute, or an unprotected attribute.
The following object identifier identifies the countersignature
attribute:

id-countersignature OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs9(9) 6 }

Countersignature attribute values have ASN.1 type Countersignature:

Countersignature ::= SignerInfo

Countersignature values have the same meaning as SignerInfo values
for ordinary signatures, except that:

1. The signedAttributes field MUST NOT contain a content-type
attribute; there is no content type for countersignatures.

2. The signedAttributes field MUST contain a message-digest
attribute if it contains any other attributes.

3. The input to the message-digesting process is the contents
octets of the DER encoding of the signatureValue field of the
SignerInfo value with which the attribute is associated.

A countersignature attribute can have multiple attribute values. The
syntax is defined as a SET OF AttributeValue, and there MUST be one
or more instances of AttributeValue present.

The UnsignedAttributes syntax is defined as a SET OF Attributes. The
UnsignedAttributes in a signerInfo may include multiple instances of
the countersignature attribute.

A countersignature, since it has type SignerInfo, can itself contain
a countersignature attribute. Thus, it is possible to construct an
arbitrarily long series of countersignatures."


Somebody can help me? Again:
How do I, in C#, compute a CounterSignature of a CounterSignature, and add this new CounterSignature to the SignedCms ?
Generalstring in sql statement Pin
eyeseetee6-Dec-07 2:18
eyeseetee6-Dec-07 2:18 
GeneralRe: string in sql statement Pin
Skippums6-Dec-07 2:29
Skippums6-Dec-07 2:29 
GeneralRe: string in sql statement Pin
eyeseetee6-Dec-07 2:49
eyeseetee6-Dec-07 2:49 
GeneralRe: string in sql statement Pin
eyeseetee6-Dec-07 3:02
eyeseetee6-Dec-07 3:02 
GeneralRe: string in sql statement Pin
Abhijit Jana6-Dec-07 3:26
professionalAbhijit Jana6-Dec-07 3:26 
GeneralTCP/IP - Sockets Pin
half-life6-Dec-07 1:56
half-life6-Dec-07 1:56 
GeneralRe: TCP/IP - Sockets Pin
Andre Azevedo6-Dec-07 2:03
Andre Azevedo6-Dec-07 2:03 
GeneralRe: TCP/IP - Sockets Pin
half-life6-Dec-07 2:07
half-life6-Dec-07 2:07 
GeneralRe: TCP/IP - Sockets Pin
Mike Dimmick6-Dec-07 3:09
Mike Dimmick6-Dec-07 3:09 
GeneralRe: TCP/IP - Sockets Pin
half-life6-Dec-07 3:58
half-life6-Dec-07 3:58 
GeneralChange cell color of dataGridView Pin
M Riaz Bashir6-Dec-07 1:35
M Riaz Bashir6-Dec-07 1:35 
GeneralRe: Change cell color of dataGridView Pin
Sathesh Sakthivel6-Dec-07 1:39
Sathesh Sakthivel6-Dec-07 1:39 
QuestionFormDats (width, height, ...) save to XML for Dual-Monitors Pin
merlin.AT6-Dec-07 1:29
merlin.AT6-Dec-07 1:29 
QuestionFtp over Ftp Proxy GetResponse() error Pin
Springtime6-Dec-07 1:22
Springtime6-Dec-07 1:22 
GeneralRe: Ftp over Ftp Proxy GetResponse() error Pin
Sam Xavier17-Jan-08 23:47
Sam Xavier17-Jan-08 23:47 
GeneralList of Countries Pin
nagendrathecoder6-Dec-07 1:21
nagendrathecoder6-Dec-07 1:21 
GeneralRe: List of Countries Pin
Nagy Vilmos6-Dec-07 1:37
professionalNagy Vilmos6-Dec-07 1:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.