Re: How to convert a buffer to an intern structure???

2004-08-03 Thread Juan Segarra
You can use a memory bio and then the appropiate PEM I/O function.
Something like:

BIO *bioMem;
char *keyBuffer;
X509 *cert;

/* Read de buffer (bla,bla,bla) :-) */

/* And now... */

bioMem =3D BIO_new_mem_buf(keyBuffer, keyBufferLen);
cert =3D PEM_read_bio_X509(bioMem,NULL,NULL,NULL);


---
Juan Segarra
http://spisa.act.uji.es/~juan
__
OpenSSL Project http://www.openssl.org
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]


How to convert a buffer to an intern structure???

2004-08-02 Thread Carlos Roberto Zainos H
Hi guys!!!
I'm working in a Crypto-OpenSSL based Project generating and mannaging X509 cert's. I have a little problem because I'm using an Oracle DB like repository.The cert's arestored in PEM format in the DB (-BEGIN . END-), the connection between my app and the server is ODBC based, when Irecover the cert from DBI store that in a buffer (char []) but I don't know how convert that buffer in an intern usable structure...(Maybe BIO or PEM)

Any hint???

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

RE: How to convert a buffer to an intern structure???

2004-08-02 Thread sakthi.subramaniam
Title: Message



Hi.,
Use d2i interfaces
For
any object...
d2i_OBJNAME(OBJTYPE *obj, char *pp, long length)

for
example 
to get
RSA key from buffer

RSA
*rsa
rsa =
d2i_RSAPublicKey(NULL, buf, len)..
Hope
it helps..

  
  -Original Message-From:
  [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
  Behalf Of Carlos Roberto Zainos HSent: Monday, August 02, 2004
  10:21 PMTo: [EMAIL PROTECTED]Subject: How to
  convert a buffer to an intern structure???
  Hi guys!!!
  I'm working in a Crypto-OpenSSL based Project generating and mannaging
  X509 cert's. I have a little problem because I'm using an Oracle DB like
  repository.The cert's arestored in PEM format in the DB
  (-BEGIN . END-), the connection between my app and the
  server is ODBC based, when Irecover the cert froom DBI store that
  in a buffer (char []) but I don't know how convert that buffer in an intern
  usable structure...(Maybe BIO or PEM)
  
  Any hint???
  
  Best Regards
  Zainos
  
  
  Do You Yahoo!?Yahoo!
  Net: La mejor conexión a internet y 25MB extra a tu correo por $100 al mes.




Confidentiality Notice

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately
and destroy all copies of this message and any attachments.