Re: [openssl-users] M_ASN1_D2I_* replacement in OpenSSL 1.1.0

2016-09-20 Thread Dr. Stephen Henson
On Tue, Sep 20, 2016, Aleksandr Konstantinov wrote: > Hello, > > Thanks a lot. One more question if possible. Is there any way to express > single element of the ASN1 sequence which can be any > of ASN1_OCTET_STRING or ASN1_UTF8STRING and potentially other types? That depends what you mean. If t

Re: [openssl-users] M_ASN1_D2I_* replacement in OpenSSL 1.1.0

2016-09-20 Thread Erwann Abalea
Bonjour, Something like this? /* MyChoice ::= CHOICE { anInteger INTEGER, anOctetString OCTET STRING anASCIIString IA5STRING } MyStruct ::= SEQUENCE { item1 MyChoice } */ __ File mytypes.h __ #include #define ASN1_OBJECT_dup(x) ASN1_dup_of(ASN1_OBJECT,i2d_ASN1_OBJECT,d2i_ASN1_OBJE

Re: [openssl-users] M_ASN1_D2I_* replacement in OpenSSL 1.1.0

2016-09-20 Thread Aleksandr Konstantinov
Hello, Thanks a lot. One more question if possible. Is there any way to express single element of the ASN1 sequence which can be any of ASN1_OCTET_STRING or ASN1_UTF8STRING and potentially other types? Or maybe there is some tutorial for new interface similar to something like http://www.umich.edu

Re: [openssl-users] M_ASN1_D2I_* replacement in OpenSSL 1.1.0

2016-09-19 Thread Dr. Stephen Henson
On Mon, Sep 19, 2016, Aleksandr Konstantinov wrote: > > Thanks. Your answer helped a lot and I'm progressing now. Could You please > also give me a hint what M_ASN1_BIT_STRING_dup/ASN1_BIT_STRING_dup could be > replaced with? > ASN1_STRING_dup should work fine: ASN1_BIT_STRING is actually typed

Re: [openssl-users] M_ASN1_D2I_* replacement in OpenSSL 1.1.0

2016-09-19 Thread Aleksandr Konstantinov
Hello, Thanks. Your answer helped a lot and I'm progressing now. Could You please also give me a hint what M_ASN1_BIT_STRING_dup/ASN1_BIT_STRING_dup could be replaced with? Best regards, A.K. On Fri, Sep 9, 2016 at 2:44 PM, Dr. Stephen Henson wrote: > On Fri, Sep 09, 2016, Aleksandr Konst

Re: [openssl-users] M_ASN1_D2I_* replacement in OpenSSL 1.1.0

2016-09-09 Thread Dr. Stephen Henson
On Fri, Sep 09, 2016, Aleksandr Konstantinov wrote: > Hello, > > Thanks for your answer. Here is one of d2i functions simplified: > > MYEXT * d2i_MYEXT(MYEXT ** myext, unsigned char ** pp, long length) { > M_ASN1_D2I_vars(myext, MYEXT *, MYEXT_new); > M_ASN1_D2I_Init(); > M_ASN1_D2I_start_

Re: [openssl-users] M_ASN1_D2I_* replacement in OpenSSL 1.1.0

2016-09-08 Thread Aleksandr Konstantinov
Hello, Thanks for your answer. Here is one of d2i functions simplified: MYEXT * d2i_MYEXT(MYEXT ** myext, unsigned char ** pp, long length) { M_ASN1_D2I_vars(myext, MYEXT *, MYEXT_new); M_ASN1_D2I_Init(); M_ASN1_D2I_start_sequence(); M_ASN1_D2I_get_EXP_opt(ret->intmember, d2i_ASN1_INTEGER

Re: [openssl-users] M_ASN1_D2I_* replacement in OpenSSL 1.1.0

2016-09-08 Thread Dr. Stephen Henson
On Thu, Sep 08, 2016, Aleksandr Konstantinov wrote: > Hello all, > > I'm in process of porting our project to OpenSSL 1.1.0. We have part of > code which heavily uses M_ASN1_D2I_* and M_ASN1_I2D_* for defining d2i_* > and i2d_* methods for new extension. For example code uses M_ASN1_D2I_vars, > M

[openssl-users] M_ASN1_D2I_* replacement in OpenSSL 1.1.0

2016-09-07 Thread Aleksandr Konstantinov
Hello all, I'm in process of porting our project to OpenSSL 1.1.0. We have part of code which heavily uses M_ASN1_D2I_* and M_ASN1_I2D_* for defining d2i_* and i2d_* methods for new extension. For example code uses M_ASN1_D2I_vars, M_ASN1_D2I_Init and M_ASN1_D2I_start_sequence to start reading seq