Answering my own question - I forgot the END of sequence in the marco.
Functional code below.
Dw.
> On 28 Aug 2020, at 15:49, Dirk-Willem van Gulik wrote:
>
> I've got a very simple sequence of to integers that I am trying to convert to
> DER.
>
> Bt I am getting an error or segfault in the
I've got a very simple sequence of to integers that I am trying to convert to
DER.
Bt I am getting an error or segfault in the final i2d step (lengt -1 for
i2d_X9_62).
Any advice on what is going wrong here ?
With kind regards,
Dw.
#include
#include
#include
#include
#include
#includ
I can successfully deconstruct an an ECDSA Signature Sequence, but now I
need
to construct it, and I am getting lost.
The format I need to build is:
sECDSA-Sig-Value ::= SEQUENCE { r INTEGER, s INTEGER }
I have r and s as buffers in the same format as returned from:
d2i_ASN1_INTEGER() if one used
Hi,
(Apologies if this was sent multiple times; I'm experiencing some technical
difficulties.)
I'm working on a CSR-generating API using OpenSSL 1.0.2m.
My question is: does OpenSSL do any sort of reordering of the entries in an
ASN1 sequence? Specifically, when encoding a post
f length encoding) but I figure there must be an
> > > easier way.
> >
> > You can use the macros in asn1t.h for parsing DER encoded data. Have a
> > look at the comment starting at line 132 (I'm using OpenSSL 1.0.0e) of
> > this header file. It explains how to dec
d data. Have a
> look at the comment starting at line 132 (I'm using OpenSSL 1.0.0e) of
> this header file. It explains how to declare an ASN1 SEQUENCE. You can
> find plenty of examples using these macros within the OpenSSL source
> (for example crypto/pkcs7/p7_asn1.c).
An othe
ASN1_get_object() got the job done. Thanks.
On Thu, Sep 22, 2011 at 1:34 PM, Dr. Stephen Henson wrote:
> On Thu, Sep 22, 2011, Chang Lee wrote:
>
> > Thanks for the info. I'll try to get it to work using ASN1_get_object().
> > Just for my edification, was my approach using the templates and mac
On Thu, Sep 22, 2011, Chang Lee wrote:
> Thanks for the info. I'll try to get it to work using ASN1_get_object().
> Just for my edification, was my approach using the templates and macros not
> a viable option?
>
Well it would work but you'd have to parse the whole structure which isn't
necessar
Thanks for the info. I'll try to get it to work using ASN1_get_object().
Just for my edification, was my approach using the templates and macros not
a viable option?
On Thu, Sep 22, 2011 at 12:22 PM, Dr. Stephen Henson wrote:
> On Thu, Sep 22, 2011, Chang Lee wrote:
>
> > I'm trying to parse the
On Thu, Sep 22, 2011, Chang Lee wrote:
> I'm trying to parse the content of an ASN1_OCTET_STRING, which I know/expect
> to be a DER encoded SEQUENCE, into an object. I need to do this because I'm
> trying to verify an Authenticode signature. I need to generate a digest of
> the contents of the s
I'm trying to parse the content of an ASN1_OCTET_STRING, which I know/expect
to be a DER encoded SEQUENCE, into an object. I need to do this because I'm
trying to verify an Authenticode signature. I need to generate a digest of
the contents of the signedData sans the type & length bytes. Now gene
could manually parse the Sequence (and deal with
> > > the different types of length encoding) but I figure there must be an
> > > easier way.
> >
> > You can use the macros in asn1t.h for parsing DER encoded data. Have a
> > look at the comment starting at line 132 (I
On Thu, Sep 22, 2011, Chang Lee wrote:
> Thanks Dominik for the tip. Actually, I have been poring over the OpenSSL
> code, though we're using the 0.9.8 branch, hoping to find a built-in
> primitive SEQUENCE to use but to no avail. As you say, there are templates
> for primitives and I looked at
On Thu, Sep 22, 2011, Dominik Oepen wrote:
>
> However, I'm not exactly sure whether or not the ASN1 subsystem is meant
> to be used outside of OpenSSL. I couldn't find a lot of documentation
> about it and learned how to use it by reading the source. Maybe one of
> the OpenSSL developers could c
t; look at the comment starting at line 132 (I'm using OpenSSL 1.0.0e) of
> this header file. It explains how to declare an ASN1 SEQUENCE. You can
> find plenty of examples using these macros within the OpenSSL source
> (for example crypto/pkcs7/p7_asn1.c).
>
> However, I'm
ile. It explains how to declare an ASN1 SEQUENCE. You can
find plenty of examples using these macros within the OpenSSL source
(for example crypto/pkcs7/p7_asn1.c).
However, I'm not exactly sure whether or not the ASN1 subsystem is meant
to be used outside of OpenSSL. I couldn't find a lot of d
Does anyone know of a way to take an ASN1_OCTET_STRING that contains a DER
encoded Sequence and extract the contents of the Sequence as an ASN1_STRING.
Essentially, I want to construct an ASN1 object of the Sequence. I guess I
could manually parse the Sequence (and deal with the different types o
I'm trying to add an ASN1 set to an ASN1 sequence with following code:
unsigned char *p, *p_;
ASN1_STRING *seq, *set;
ASN1_OBJECT *oid_1, *oid_2;
unsigned char *data, *data_;
int i, j, k, total;
// SET
oid_1 = OBJ_nid2obj(NID_pkcs7
Hello,
Thank you for your response. I'll try to clear up a
few things: I don't want to rewrite the ASN1 parser,
but I want to be able to decode each value separately.
I already have classes that, using the openssl parser,
decode the basic types (integer, enum, octet string,
bit string etc). So, I
On Thu, Feb 02, 2006, Enis Arif wrote:
> Please, if someone can give me an answer to my
> problem, because I have to take a decision to use
> openssl for the project or not. Is it feasible to
> modify the d2i_ASN1_SET/ASN1_item_d2i/ASN1_item_ex_d2i
> behavior or is it an easier way to do it?
>
I
Please, if someone can give me an answer to my
problem, because I have to take a decision to use
openssl for the project or not. Is it feasible to
modify the d2i_ASN1_SET/ASN1_item_d2i/ASN1_item_ex_d2i
behavior or is it an easier way to do it?
__
Do
Hello,
I have a problem with sequence unpacking. Given the
following code
ASN1_TYPE *at = NULL;
STACK_OF(ASN1_TYPE) *st = NULL;
st = ASN1_seq_unpack_ASN1_TYPE(asn1->get_data(),
asn1->get_len(), d2i_ASN1_TYPE, ASN1_TYPE_free);
if I call
at = sk_ASN1_TYPE_value (st, 0)
I get the sequence members
:asn1 encoding routines:d2i_X509:expecting an asn1
sequence.
FWIW, everything works, if I don't use mod_perl.
Thanks.
Jeff Slonaker
__
OpenSSL Project http://www.openssl.org
User Support Ma
[EMAIL PROTECTED] wrote:
>
> Hi all,
> I want to wrap data into the SEQUENCE (PKCS#1)
>
> DigestInfo ::= SEQUENCE {
> digestAlgorithm DigestAlgorithmIdentifier,
> digest Digest
> }
>
> and then DER encode it.
>
> Using OpenSSL 0.9.6b (EVP and ASN1 routines) I'm able to obtain the
> d
Hi all,
I want to wrap data into the SEQUENCE (PKCS#1)
DigestInfo ::= SEQUENCE {
digestAlgorithm DigestAlgorithmIdentifier,
digest Digest
}
and then DER encode it.
Using OpenSSL 0.9.6b (EVP and ASN1 routines) I'm able to obtain the
digested data as OCTET STRING, but how can I build a
error follows)
[29/Jan/2001 10:30:46 05379] [error] OpenSSL: error:0D09F007:asn1 encoding
routines:d2i_X509:expecting an asn1 sequence
Used packages are:
Apache 1.3.12
OpenSSL 0.9.5a
mod_ssl 2.6.6.-1.3.12
Operating System is Linux RH6.1
Thank you for your help in advance
best regards,
Markus
Thanks to Dr Stephen, the solution was convert the certificate file to
PEM format (it was in PCKS#7):
First change the "BEGIN CERTIFICATE" and "END CERTIFICATE" lines to
"BEGIN PKCS7"/"END PKCS7" and then run "openssl pkcs7 -in server.gid
-out certs.pem -print_certs".
[]s,
Sergio Salvi.
eply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
> Subject: "expecting an asn1 sequence" error - HELP!
>
> Hi guys!
>
> I'm having the following problem when trying to start apache 1.3.11 with
> mod_ssl 2.5.0 and op
oding routines:d2i_X509:expecting an
asn1 sequence
In my apache conf file:
---
SSLEnable
SSLCertificateFile /usr/local/ssl/certs/server.gid
SSLCertificateKeyFile /usr/local/ssl/private/server.key
SSLCertificateChainFile /usr/local/ssl/certs/verisign.chain
SSLLogLevel trace
---
Where server.gid is a base6
29 matches
Mail list logo