Thanks to those who answered. It was a simple goof using std::string's
substr() method; I was treating the second parameter as the end position
rather than the character count, thus lopping off some essential characters
and causing the failure. It works now.
On Mon, May 16, 2011, G S wrote:
> A follow-up: After seeing an example, I tried printing the result of
> ERR_reason_error_string(ERR_get_error()). It's null.
ERR_print_errors_fp(stderr) might be more useful: see FAQ.
Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial te
On Mon, May 16, 2011 at 9:53 AM, John Hascall wrote:
>
>> Duh, thanks to the people who pointed out that the pointer returned by
>> PEM_read_bio_RSA_PUBKEY might be null, and indeed it is (sadly I have to use
>> Xcode, which refuses to show any local variables and GDB claims they don't
>> exist).
A follow-up: After seeing an example, I tried printing the result of
ERR_reason_error_string(ERR_get_error()). It's null.
OK, this is perplexing. I have a PEM-format RSA key in a character string
called _publicKey, with newlines between the header, key data, and trailer.
Like this:
-BEGIN PUBLIC KEY
MCwwHRTJKoZIhvcNAQEBBQADGwAwGAIRALPMoZzXMLIKhidteVfdR28CAwEAAQ==
-END PUBLIC KEY-
But PEM_read_bio_RS
Ah, I see the g3 option generates extra debugging info. I'll give it a
shot. I have a bug open with Apple about this anyway. It has proven to be
very hard to pin down. Restarting Xcode will usually eliminate the problem
and let you step through code... ONCE. If you want to do it again, you hav
On Mon, May 16, 2011 at 6:53 AM, John Hascall wrote:
>
> > (sadly I have to use
> > Xcode, which refuses to show any local variables and GDB claims they
> don't
> > exist).
>
>This is probably the optimizer, try compiling with -O0 -g3
>
Thanks, John, I am building Debug. I verified that -O0
> Duh, thanks to the people who pointed out that the pointer returned by
> PEM_read_bio_RSA_PUBKEY might be null, and indeed it is (sadly I have to use
> Xcode, which refuses to show any local variables and GDB claims they don't
> exist).
This is probably the optimizer, try compiling with -O0
Duh, thanks to the people who pointed out that the pointer returned by
PEM_read_bio_RSA_PUBKEY might be null, and indeed it is (sadly I have to use
Xcode, which refuses to show any local variables and GDB claims they don't
exist).
The question now is why it's null, since I know the string itself i
Is pubKey a valid pointer after PEM_read_bio_RSA_PUBKEY?
If it is NULL there is an error in PEM data.
Da: owner-openssl-us...@openssl.org [mailto:owner-openssl-us...@openssl.org]
Per conto di G S
Inviato: lunedì 16 maggio 2011 12:13
A: openssl-users@openssl.org
Oggetto: Why would RSA_size
> I'm trying to use the OpenSSL crypto lib. I've generated a public/private
> RSA key pair. Then I wrote some code to try to encrypt an eight-byte random
> string. But it crashes in RSA_size(). Here's the code:
>
> BIO* bp = BIO_new_mem_buf(_publicKey, -1);//
> Cr
Hi all.
I'm trying to use the OpenSSL crypto lib. I've generated a public/private
RSA key pair. Then I wrote some code to try to encrypt an eight-byte random
string. But it crashes in RSA_size(). Here's the code:
BIO* bp = BIO_new_mem_buf(_publicKey, -1);//
Create
12 matches
Mail list logo