EldoS | Feel safer!

Software components for data protection, secure storage and transfer

TElSignedCMSMessage CustomSignedAttributes

#10750
Posted: 08/06/2009 14:16:37
by QualiSign Infom├ítica S/A (Standard support level)
Joined: 03/13/2007
Posts: 55

How can i set values to CustomSignedAttributes?

FCMS.Signatures(i).CustomSignedAttributes.Attributes(0) = SBUtils.Unit.StrToOID("1.3.6.1.4.1.311.88.2.1")

FCMS.Signatures(i).CustomSignedAttributes.Values(0) = ?????

how to set "file.doc"?

thanks for help.
#10751
Posted: 08/06/2009 15:28:14
by Ken Ivanov (Team)

Code
        ' converting attribute value to Unicode
        Dim UniData() As Byte
        UniData = Encoding.Unicode.GetBytes("file.doc" & Chr(0))

        ' enveloping the value with ASN.1 octet string type
        Dim AsnData() As Byte
        AsnData = SBMessages.Unit.FormatAttributeValue(SBASN1Tree.Unit.SB_ASN1_OCTETSTRING, UniData)

        ' (!) FormatAttributeValue will be moved to SBASN1Tree.Unit namespace in the future build update

        Sig.CustomSignedAttributes.Count = 1
        Sig.CustomSignedAttributes.Attributes(0) = SBUtils.Unit.StrToOID("1.3.6.1.4.1.311.88.2.1")
        Sig.CustomSignedAttributes.Values(0).Add(AsnData)

Reply

Statistics

Topic viewed 1051 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!