Re: ASN1 <-> DER encoding with application tag

2021-11-07 Thread Max Larsson
I have to “manually” encode the OID and innerContextToken. Best regards Max From: openssl-users on behalf of Matt Caswell Date: Friday, 5. November 2021 at 11:41 To: openssl-users@openssl.org Subject: Re: ASN1 <-> DER encoding with application tag On 04/11/2021 17:39, Max Larsson

Re: ASN1 <-> DER encoding with application tag

2021-11-05 Thread Matt Caswell
@openssl.org *Subject: *Re: ASN1 <-> DER encoding with application tag On 04/11/2021 13:58, Max Larsson wrote: >      i2d_GSSAPI_CONTEXTTOKEN( negToken,&p ); > You can tell i2d to encode using "application" tagging like this: ASN1_item_ex_i2d((const A

Re: ASN1 <-> DER encoding with application tag

2021-11-04 Thread Max Larsson
. November 2021 at 17:29 To: Max Larsson Cc: openssl-users@openssl.org Subject: Re: ASN1 <-> DER encoding with application tag The data is not correct if it supposed to match RFC 2743. The first byte is [APPLICATION 0]. That seems fine. The second byte provides a length for the full SEQUENC

Re: ASN1 <-> DER encoding with application tag

2021-11-04 Thread Max Larsson
-users@openssl.org Subject: Re: ASN1 <-> DER encoding with application tag On 04/11/2021 13:58, Max Larsson wrote: > i2d_GSSAPI_CONTEXTTOKEN( negToken,&p ); > You can tell i2d to encode using "application" tagging like this: ASN1_item_ex_i2d((const A

Re: ASN1 <-> DER encoding with application tag

2021-11-04 Thread Russ Housley
facilityboss.biz>> > Cc: openssl-users@openssl.org <mailto:openssl-users@openssl.org> > mailto:openssl-users@openssl.org>> > Subject: Re: ASN1 <-> DER encoding with application tag > > RFC 2743 shows this structure: > MechTyp

Re: ASN1 <-> DER encoding with application tag

2021-11-04 Thread Matt Caswell
On 04/11/2021 13:58, Max Larsson wrote:     i2d_GSSAPI_CONTEXTTOKEN( negToken,&p ); You can tell i2d to encode using "application" tagging like this: ASN1_item_ex_i2d((const ASN1_VALUE **)&negToken, &p, ASN1_ITEM_rptr(GSSAPI_CONTEXTTOKEN), 0,

Re: ASN1 <-> DER encoding with application tag

2021-11-04 Thread Max Larsson
, is there a way to get decode with openssl anyway? Max From: Russ Housley Date: Thursday, 4. November 2021 at 15:08 To: Max Larsson Cc: openssl-users@openssl.org Subject: Re: ASN1 <-> DER encoding with application tag RFC 2743 shows this structure: MechType ::= OBJECT IDEN

Re: ASN1 <-> DER encoding with application tag

2021-11-04 Thread Russ Housley
ize ); > ASN1_OCTET_STRING_set( > negToken->innerContextToken,mechToken,mechTokenSize ); > > buffer = NULL; > size_t bufferSize = i2d_GSSAPI_CONTEXTTOKEN( negToken,NULL ); > > printf( "Required buffer size for DER encoding of

ASN1 <-> DER encoding with application tag

2021-11-04 Thread Max Larsson
printf( "Required buffer size for DER encoding of ASN1 structure: %zu\n",bufferSize ); unsigned char *buffer = malloc( bufferSize ); unsigned char *p = buffer; i2d_GSSAPI_CONTEXTTOKEN( negToken,&p ); for( int len = 0;len < bufferSize;len++ ) {

RE: DER encoding SubjectPublicKeyInfo

2008-04-22 Thread Roger Boden
Right, I had missed that algorithm identifier is a sequence. Now it makes sence. Thanks! -- R > From: [EMAIL PROTECTED] > To: openssl-users@openssl.org > Subject: Re: DER encoding SubjectPublicKeyInfo > Date: Tue, 22 Apr 2008 14:39:34 +0200

Re: DER encoding SubjectPublicKeyInfo

2008-04-22 Thread francesco.petruzzi
you can see using the lengths the second sequence contains only algoritm oid and parameters (in this case NULL parameters). This is AlgorithmIdentifier. Below the bit string contains the der encoding of subjectPublicKey (encoded). Francesco Petruzzi [EMAIL PROTECTED] - Original Message

RE: DER encoding SubjectPublicKeyInfo

2008-04-22 Thread Roger Boden
Thanks, that explains the 0x30 tag value. What about the DER encoding? Is that correct? The 'openssl asn1parse' output of the DER encoding is: 0:d=0 hl=3 l= 159 cons: SEQUENCE 3:d=1 hl=2 l= 13 cons: SEQUENCE 5:d=2 hl=2 l= 9 pr

Re: DER encoding SubjectPublicKeyInfo

2008-04-21 Thread Marek . Marcola
AlgorithmIdentifier, > subjectPublicKey BIT STRING } > > According to rfc 3279, the bit string subjectPublicKey should hold the DER encoding of > the following ASN.1 defintion: > RSAPublicKey ::= SEQUENCE { > modulusINTEGER,-- n > p

DER encoding SubjectPublicKeyInfo

2008-04-21 Thread Roger Boden
subjectPublicKey should hold the DER encoding of the following ASN.1 defintion: RSAPublicKey ::= SEQUENCE { modulusINTEGER,-- n publicExponent INTEGER } -- e In order to achieve this encoding I tried to call i2d_X509_PUBKEY(). The DER output of this

AW: problem using pkcs7 DER encoding

2007-08-16 Thread Christian Wiesbauer
tag, 16. August 2007 16:18 An: openssl-users@openssl.org Betreff: Re: problem using pkcs7 DER encoding On Thu, Aug 16, 2007 at 03:58:19PM +0200, Christian Wiesbauer wrote: > Hi, > > > > I'm trying to write a pkcs7 object with following code to a file: > > >

Re: problem using pkcs7 DER encoding

2007-08-16 Thread Christian Hohnstaedt
On Thu, Aug 16, 2007 at 03:58:19PM +0200, Christian Wiesbauer wrote: > Hi, > > > > I'm trying to write a pkcs7 object with following code to a file: > > > > unsigned char *tmp, signature; unsigned char *tmp, *signature; > > int iLen; > > > > iLen = i2d_PKCS7(p7, NULL); > > signat

problem using pkcs7 DER encoding

2007-08-16 Thread Christian Wiesbauer
Hi, I'm trying to write a pkcs7 object with following code to a file: unsigned char *tmp, signature; int iLen; iLen = i2d_PKCS7(p7, NULL); signature = (unsigned char*) malloc(iLen); tmp = signature; iLen = i2d_PKCS7(p7, &tmp); FILE *fpkcs7 = fopen("C:\\sig.p7s", "w+"); for(int

Re: DER-encoding

2005-05-17 Thread pana
Very well! thanks. Where can I find the documentation to learn about to use the mini compiler? bye pana On 5/17/05, Dr. Stephen Henson <[EMAIL PROTECTED]> wrote: > On Tue, May 17, 2005, pana wrote: > > > Hi, > > > > how can I obtain a word in the DER-encoding form

Re: DER-encoding

2005-05-17 Thread Dr. Stephen Henson
On Tue, May 17, 2005, pana wrote: > Hi, > > how can I obtain a word in the DER-encoding form? > I need it represented in octets to use it in custom extensions definition. > for example: 1e:08:00:55:00:73:00:65:00:72 > If you are using OpenSSL 0.9.8-dev you don't need t

DER-encoding

2005-05-17 Thread pana
Hi, how can I obtain a word in the DER-encoding form? I need it represented in octets to use it in custom extensions definition. for example: 1e:08:00:55:00:73:00:65:00:72 bye pana __ OpenSSL Project

Re: DER encoding:

1999-03-03 Thread Massimiliano Liccardo
GOMEZ Henri wrote: > I'm trying to generate a certificate for IE 4. > > Hi Gomez, I'll try to find a working example of a MSIE 4.0 certificate request html page.. Can you point me some links ??? -- o___ /\_ _| | Max Liccardo - Security Pianist Consultant _\

Re: DER encoding:

1999-03-03 Thread Erwann ABALEA
On Wed, 3 Mar 1999, GOMEZ Henri wrote: > I'm trying to generate a certificate for IE 4. > > The .p12 generated by the following script is successfully imported in > NS. > > But the DER encoded cert generated from .pem' one via > $ssleay x509 -in $sslcrtdir/$user.crt -outform DER -out > $sslcrt

DER encoding:

1999-03-03 Thread GOMEZ Henri
I'm trying to generate a certificate for IE 4. The .p12 generated by the following script is successfully imported in NS. But the DER encoded cert generated from .pem' one via $ssleay x509 -in $sslcrtdir/$user.crt -outform DER -out $sslcrtdir/$user.der Any Idea... PS: I run my own self signed