On 18-08-2010 19:41, Alessandro Menti wrote:

Thanks for your help, Jacob.

Where can I find your signing tools? A quick Google search
revealed no useful links.

Sorry, closed source in-house code only, tied heavily into other
closed source code, anyway it was a client, not a server.

Alternatively, can you suggest me how to complete the original
ASN.1 structures so as to add the explicit [0] tag? I have already
searched the official OpenSSL documentation for some clues, but I
have found nothing of interest (moreover, this is the first time
I use the OpenSSL library in one of my projects).

Sorry, I don't know how to specify ASN.1 structures in OpenSSL,
my own code contained its own mini-DER encoder limited to just
the needed structures, and didn't use OpenSSL either at the time.

Anyway, I am not sure if your notation is the old deprecated one
or the new one (OpenSSL transitioned from one way of doing ASN.1
to another some time ago, and there was a FAQ entry about not
using ASN1_SOME_EVIL_MACRO).

Thanks in advance,
Alessandro Menti

----- Original structures -----
typedef struct {
     ASN1_OBJECT *type;
     ASN1_OCTET_STRING *data;
} TimeStampContentInfo;

typedef struct {
     ASN1_OBJECT *countersignatureType;
     TimeStampContentInfo *content;
} TimeStampRequest;

ASN1_SEQUENCE(TimeStampContentInfo) = {
     ASN1_SIMPLE(TimeStampContentInfo, type, ASN1_OBJECT),
     ASN1_EXP_OPT(TimeStampContentInfo, data, ASN1_OCTET_STRING, 0)
} ASN1_SEQUENCE_END(TimeStampContentInfo)

DECLARE_ASN1_FUNCTIONS(TimeStampRequest)
ASN1_SEQUENCE(TimeStampRequest) = {
     ASN1_SIMPLE(TimeStampRequest, countersignatureType, ASN1_OBJECT),
     ASN1_SIMPLE(TimeStampRequest, content, TimeStampContentInfo)
} ASN1_SEQUENCE_END(TimeStampRequest)
IMPLEMENT_ASN1_FUNCTIONS(TimeStampRequest)
                                        

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to