Hello,
I have got ths kind of error after running my program : error:0D07209B:asn1
encoding routines:ASN1_get_object:too long
I code with c++, my constructor is like this :

certificate(const char *str, size_t clen) {
     unsigned char const *u_str = reinterpret_cast< unsigned char const *
>(str);
     X509* mycert = d2i_X509(NULL, &u_str, clen);
     ..
}

when I run my prog, I have got segmentation fault because mycert is NULL (
after debuging ). I think it is likely because of reinterpret_cast ... am I
wrong?
I cannot change the constructor's signature. ( cannot make
certificate(unsigned const char *str, size_t clen ) .
Is there another way to convert from const char *str to unsigned const char
* ?

I often meet this kind fo issue ( converting from const char *str to
unsigned const char * u_str )

Thanks for your help.

Reply via email to