SSL_read confusion

2005-05-23 Thread Carlos Roberto Zainos H
Hi guys! I have some doubts in SSL functions, specially inSSL_read function. I'm trying towrite an HTTPS generic client (POST and GET methods must be availables), I've written the code for connection via win sockets (blocking socket) and used the next code for the SSLhandshake: if ((ctx =

PKCS12 function problem

2005-05-11 Thread Carlos Roberto Zainos H
Hi there!! I'm trying to use the high level function PKCS12_create in my appto get a p12 file to import it in MSIE and MS Outlook but it seems to be nothing, I mean, I get an empty p12 file. Ifollowed the pkwrite example in \demos\pkcs12 but it doesn't works.. follow mi code: out =

Re: Windows instalattion

2005-04-18 Thread Carlos Roberto Zainos H
Hi Silvia !! Why not tries with this: http://www.slproweb.com/products/Win32OpenSSL.html It's a Windows Installer package of OpenSSL and works really good. When you install it you will get a libeay32.lib, ssleay32.lib and his .dll corresponding files. Also you will get a folder with header's

CertsPrivkeys in PKCS#12 format, hints needed ....

2005-03-04 Thread Carlos Roberto Zainos H
Hi all!!! Thanks a lot Dr Henson .. you reallypoint me in the right way . My last question posted was based in certs and keys separated and we want build them in a PKCS12 file for exchange it... I have another question . what about the case if we want generate RSA private keys, to create

PKCS12 help needed

2005-03-02 Thread Carlos Roberto Zainos H
Hi there!!! I'm trying to usethe openssl pkcs12 option from command line but I don't undestand very well the options. I have a pair (private key and certificate file) both in PEM format. I want to get a PKCS#12 file which content both. I would like importa that (the PKCS12 file) into MS Outlook

ASN1_sign error

2005-02-23 Thread Carlos Roberto Zainos H
Hi there!!! I've been workingvery wellwith openssl crypto library without "unexpected" errors. But this time I get an error using X509_REQ_sign ( )... I've made a lot ofCSR's in a lot of clients with this function without problems but now when I copy-paste the source code to another app the

Question about EVP_PKEY_free ()

2004-10-21 Thread Carlos Roberto Zainos H
Hi all!! I have a little problem using EVP_PKEY_free() function. This crash my program. I'm makingsomething like this in my source code: EVP_PKEY *key=NULL; RSA *rsa=NULL; key=EVP_PKEY_new(); EVP_PKEY_assign_RSA (key, rsa); // . other code here .

Re: storing PEM encoded certs in database

2004-09-07 Thread Carlos Roberto Zainos H
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 ODBCbased 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

making and signing new certificates

2004-09-02 Thread Carlos Roberto Zainos H
Eric Meyer [EMAIL PROTECTED] wrote:--HiEric Yes, You are right, the openssl documents are not well detailed and, in some cases, out-to-date; also sometimes, ,just like you, I feel a little confused an desperate but this makes you self

making and signing new certificates

2004-09-02 Thread Carlos Roberto Zainos H
Eric Meyer [EMAIL PROTECTED] wrote:--HiEric Yes, You are right, the openssl documents are not well detailed and, in some cases, out-to-date; also sometimes, ,just like you, I feel a little confused an desperate but this makes you self

Memory Leak still in my app

2004-08-31 Thread Carlos Roberto Zainos H
Hi guys and hi Eric ! I have been tested my app again and again and following the Dr Stephen recommendations, I discovered that the BIO's are not the problem, all they points to NULL after them has been freed. I think the problem could be in freeing the other structures . I have a main

OpenSSL function for pure base64 encoding.....

2004-08-10 Thread Carlos Roberto Zainos H
Hi all!! Thanks a lot for your answers!!! they were really useful !!! Now I have another question. Is there an OpenSSL function to perform a pure base64 (not PEM)encoding of a buffer?? I've read in OpenSSL docs that the bio's filterscould be useful but I made a little test and this fails

Suggestions for the password storing

2004-08-09 Thread Carlos Roberto Zainos H
Hi team!! I have a "big" question,where is an appropriate place to store the encryption password of the privatekey? I mean, the security base of the priv key is based on the password which is encrypted it (PKCS#1), so where will be a safe place to put this pwd in the client's computer

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

X509_REQ_to_X509 Status

2004-05-27 Thread Carlos Roberto Zainos H
Hi all !! I'm trying to develop a Capp to manage a CSR (req.pem), verify it and sign it; verificationroutine is OK, but when Itry to use the nex function to convert REQ in X509 cert: X509_REQ_to_X509(req, DAYS, pubkey_ai) the function breaks my program. What is the status of this function???

Adding extension to X509_REQ

2004-05-21 Thread Carlos Roberto Zainos H
Hi all First of all, thank you so much for the answers about JAVA-OpenSSL, those really were help full for me. In another time I will detail what I'm trying to do, even though JNI profiles like my solution. This time my question is about to include in a X509_REQ a subfield which contain the

OpenSSL functionality from JAVA

2004-05-19 Thread Carlos Roberto Zainos H
I retake a question posted few weeks ago. Is possible, or is there a way of, or what do I must do to have or make use of all OpenSSL functionality from java applications?? Exactly I want to make use of cryptographic functions implemented in Openssl (crypto) but in Java programs (e.g symmetric

Problems encrypting private key

2004-05-17 Thread Carlos Roberto Zainos H
Hi all ! I'mwriting an application that needs write out a RSA private key password based encryption in DER format but I'm getting error from functions used for, follows my code and error codes: ERR_load_crypto_strings ();out = BIO_new(BIO_s_file()); rsa = RSA_generate_key (bits, e_value,

Re: Problems encrypting private key

2004-05-17 Thread Carlos Roberto Zainos H
Thanks a lot Dr Henson ! Now all works fine ZainosDo You Yahoo!? Yahoo! Net: La mejor conexión a internet y 25MB extra a tu correo por $100 al mes.

RSA_XXX_encrypt doubts

2004-04-28 Thread Carlos Roberto Zainos H
Hi list Thank you very much Dr Stephen, decrypting PBE privkey problems were fixed on my app and now works pretty good. Now I have another problem. For design reasons (not my design) I must use both RSA_private_encrypt and RSa_public_encrypt in my app. Designers think that it's better by

Problems with d2i_PKCS8PrivateKey_bio function

2004-04-27 Thread Carlos Roberto Zainos H
Hi Dr Henson and openssl users list. I'm very thankful by your answers. This time I'm having problems with the d2i_PKCS8PrivateKey_bio function. This alwaysreturns me0 , and really I don't know what's wrong. My code: RSA *rsa;EVP_PKEY *dec_key, **x=NULL; BIO *in=NULL; char *password =

RE: Sample config file

2004-04-26 Thread Carlos Roberto Zainos H
Hi ! Dr Henson refers to openssl-0.9.7.your-dist/apps (if you're working in a Linux/Unix box), in that directory there is an openssl.cnf file (openssl example configuraton file). If you're working in Win32 there must be an openssl.cnf in C:\openssl-folder\bin.In both cases you must customize (if

Problems decrypting PKCS# Private Key , Help needed

2004-04-23 Thread Carlos Roberto Zainos H
Hi all!!! Thanks again for the answers. The question that I now post refers to decrypt a private key PBE (PKCS#5). I've working with priv/pub keys gotten from openssl, but now my C applications needs to work with ones generated with another application (commercial software). I've been discovered

Re: Problems decrypting PKCS# Private Key , Docs needed

2004-04-23 Thread Carlos Roberto Zainos H
If its in DER format then d2i_PKCS8PrivateKey_bio() will handle the encryptedform, and d2i_PKCS8_PRIV_KEY_INFO() followed by EVP_PKCS82PKEY() for theunencrypted form.Steve. Thanks a lot dr Henson . just another little question where are the references to d21PKCS8_PRIV_KEY_INFO() and

How to encrypt a RSA priv key

2004-04-14 Thread Carlos Roberto Zainos H
Hi !! I have some problems because I want a RSA private key in DER form but des-cbc codified. The source key is in PEM encoded form (password protected) and I need something similar but in DER encoded form (also password protected key). I have been tried with: openssl rsa -in mykey.pem -outform

Re:Programming difficulties

2004-04-01 Thread Carlos Roberto Zainos H
Thanks a lot Dr Stephan, Richard and Bernhard I made revisions to my source, docs and faq's and now this works fine ... Best regards Zainos Do You Yahoo!? Yahoo! Net: La mejor conexión a internet y 25MB extra a tu correo por $100 al mes.

Can't open CER certificate

2004-03-29 Thread Carlos Roberto Zainos H
Hi Dr Stephen : Thanks for your answer As you told me I ran the openssl x509command in win32 command line, and the result was the next: With a CA certificate: C:\openssl\binopenssl x509 -in c:\crzh\progs\ac.cer -noout -textunable to load certificate660:error:0906D06C:PEM

newbie question ...

2004-03-26 Thread Carlos Roberto Zainos H
Hi all !!! I've been working for a while with the cipher and digest RC4-SHA1 routines for a project, but now I want to use the X509 libraries to handle an certificate.cer issued by a local CA. I've looked and been tried with d2i_X509 and d2i_X509_fp routines but my tests fails. So .. my question