Hi , i'm trying to convert ASN1_INTEGER (specifically certificate serial number) into its DER representation. I'm using i2c_ASN1_INTEGER - and if it's the right function - then I don't understand why it moves a pointer passed to it as second parameter behind reserved memory. Here is what I'm doing:
int size; ASN1_INTEGER * serial; unsigned char * serialNumberDER; size = i2c_ASN1_INTEGER(serial, NULL); serialNumberDER = new unsigned char[*size]; size = i2c_ASN1_INTEGER(serial, & serialNumberDER); The function has this code at the end: *pp+=ret; where pp is a pointer to serialNumberDER, so in effect it moves serialNumberDER behind created array of unsigned char. Please, explain it to me. Thanks in advance. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]