Hi
I'm not an expert, but I think that could be some different depending on the DBMS and the driver connection being used.
 
For example, I'm using Oracle DB 10g with ODBC based client connection to the DB.
 
I'm storing PEM certificates making a copy of it to a buffer and then storing it into the DB via INSERT with the apropiate convertions:
 
unsigned char cert[2*1024];
BIO *buf;

buf = BIO_new (BIO_s_mem());
res = PEM_write_bio_X509(buf, xreq);//xreq is the X509 cert

longitud = sizeof(cert);
res = BIO_read(buf, cert, (int)longitud);
cert[res]='\0';
//executing the INSERT via exec_sql_comm(sentence) function, where sentence = "insert into certificados (estadocer,fechacaducidad,numserie,certificado) values ('V',to_date('%s','YYYY-MM-DD HH24:MI:SS'),'%i','%s')",fecha_cad, num_serie, cert)"

Holpe this helps.
Zainos

Smith Baylor <[EMAIL PROTECTED]> wrote:
 



Do You Yahoo!?
Yahoo! Net: La mejor conexión a internet y 25MB extra a tu correo por $100 al mes.

Reply via email to