Re: bad decrypt in EVP_CipherFinal_ex

2007-11-02 Thread Alex Queiroz
Hallo, On 11/1/07, Jorge Fernandez [EMAIL PROTECTED] wrote: Make sure you use the same iv that you used when encrypting. You should make a copy of the iv vector, since the encrypting process overwrites the buffer of the iv that you pass. A friend of mine solved it, it was a problem

bad decrypt in EVP_CipherFinal_ex

2007-10-30 Thread Alex Queiroz
Hallo, I am using the symmetric cypher functions to encrypt and then decrypt a string. The cipher is aes-256-cbc. When I try to decrypt the string, I get this error: error 06065064: digital envelope routines: EVP_DecryptFinal_ex: bad decrypt I am using the same key and same iv. The

Endless loop reading from a memory BIO

2007-09-24 Thread Alex Queiroz
Hallo, I'm trying to read the PEM public key from a memory BIO with the following code. It's Delphi, but I think the meaning is clear: = procedure TJSEVPKey.GetPublicKeyPEM(jsni: TiJavaScriptNativeInterface); const bufLen = 2048; var bio: Pointer; buf: Pointer; len: Integer;

Re: Endless loop reading from a memory BIO

2007-09-24 Thread Alex Queiroz
Hallo, On 9/24/07, Dr. Stephen Henson [EMAIL PROTECTED] wrote: On Mon, Sep 24, 2007, Alex Queiroz wrote: The problem is BIO_read keeps returning -1 and BIO_should_retry keeps returning non-zero forever, so I'm stuck in an endless loop. What may be causing this? http