Re: [openssl-users] base64 decode in C

2015-03-19 Thread Prashant Bapat
-users-boun...@openssl.org] *On Behalf Of *Prashant Bapat *Sent:* Wednesday, March 18, 2015 8:08 AM *To:* openssl-users *Subject:* Re: [openssl-users] base64 decode in C Hi Dave and Walter, Thanks for our reply. I'm not doing anything different for the ssh pubkey. I'm able to decode

Re: [openssl-users] base64 decode in C

2015-03-19 Thread Prashant Bapat
Bapat *Sent:* Wednesday, March 18, 2015 8:08 AM *To:* openssl-users *Subject:* Re: [openssl-users] base64 decode in C Hi Dave and Walter, Thanks for our reply. I'm not doing anything different for the ssh pubkey. I'm able to decode it using the openssl enc -base64 -d -A command

Re: [openssl-users] base64 decode in C

2015-03-18 Thread Walter H.
Hi, before calling this function, remove any whitespace; Walter smime.p7s Description: S/MIME Cryptographic Signature ___ openssl-users mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

Re: [openssl-users] base64 decode in C

2015-03-18 Thread Prashant Bapat
Hi Dave and Walter, Thanks for our reply. I'm not doing anything different for the ssh pubkey. I'm able to decode it using the openssl enc -base64 -d -A command. But not using the C program. Attaching my entire code here. After getting the base64 decoded I'm calculating the MD5 sum and printing

Re: [openssl-users] base64 decode in C

2015-03-18 Thread Jakob Bohm
Please refer to Dave Thompson's answer, it describes your problem. On 18/03/2015 16:08, Prashant Bapat wrote: Hi Dave and Walter, Thanks for our reply. I'm not doing anything different for the ssh pubkey. I'm able to decode it using the openssl enc -base64 -d -A command. But not using the C

Re: [openssl-users] base64 decode in C

2015-03-18 Thread Scott Neugroschl
Sent: Wednesday, March 18, 2015 8:08 AM To: openssl-users Subject: Re: [openssl-users] base64 decode in C Hi Dave and Walter, Thanks for our reply. I'm not doing anything different for the ssh pubkey. I'm able to decode it using the openssl enc -base64 -d -A command. But not using the C program

[openssl-users] base64 decode in C

2015-03-18 Thread Prashant Bapat
Hi, Most likely this has been answered before, please bear with me. I'm trying to use the base64 decode function in C. Below is the function. char *b64_decode(unsigned char *input, int length) { BIO *b64, *bmem; char *buffer = (char *)malloc(length); memset(buffer, 0, length);

Re: [openssl-users] base64 decode in C

2015-03-18 Thread Walter H.
On 18.03.2015 16:08, Prashant Bapat wrote: printf(Base64 decoded string is : %s\n, b64_decode(str, strlen(str))); // This should print binary for a ssh key. not really, because the return of b64_decode is not a C string; and the format specfier %s expects a C string; smime.p7s Description: