Re: Re: Re: Cannot encrypt text - need help

2011-05-01 Thread derleader mail
The encrypted output is not a NULL terminated string so strlen will not work. EVP_DecryptUpdate(amp;ctx, (unsigned char *)plaintextz, amp;out_len, (unsigned char *)ciphertext, strlen(ciphertext)); Use the length output from the encryption part. Thank you very much

Re: Re: Re: Cannot encrypt text - need help

2011-05-01 Thread re est
Hi, What protocol are you using? What I mean is application layer protocol. But since in your example, you're using your own protocol, why not send both length and data. Example. 4 byte len field0..2^32-1 data field Then in you receiving end, do recv 4 bytes, get length, and recv until received

Re: Re: Re: Re: Cannot encrypt text - need help

2011-05-01 Thread derleader mail
What protocol are you using? What I mean is application layer protocol. But since in your example, you're using your own protocol, why not send both length and data. Example. Then in you receiving end, do recv 4 bytes, get length, and recv until received data equals to length.

Re: Cannot encrypt text - need help

2011-05-01 Thread David Schwartz
On 5/1/2011 1:34 AM, derleader mail wrote: I'm going to use stream protocol - TCP/IP. Here is the template source code of the server without the encryption part We mean application protocol. while (1) { sock = accept(listensock, NULL, NULL); printf(client connected to child thread %i with

Re: Cannot encrypt text - need help

2011-05-01 Thread John R Pierce
Don't you know how much data you've read that you're about to decrypt? in your code template, you showed the sendign routine doing... nread = recv(sock, buffer, 25, 0); isn't the recieving routine doing somethign similar? well, nread would be the length you need, no?

Re: Re: Re: Re: Cannot encrypt text - need help

2011-05-01 Thread re est
On Sun, May 1, 2011 at 5:28 PM, derleader mail derlea...@abv.bg wrote: What protocol are you using? What I mean is application layer protocol. But since in your example, you're using your own protocol, why not send both length and data. Example. 4 byte len field0..2^32-1 data field Then

Re: Re: Cannot encrypt text - need help

2011-05-01 Thread derleader mail
I'm going to use stream protocol - TCP/IP. Here is the template source code of the server without the encryption part We mean application protocol. while (1) { sock = accept(listensock, NULL, NULL); printf(client connected to child thread %i with pid %i.\n, pthread_self(),

Re: Re: Cannot encrypt text - need help

2011-05-01 Thread derleader mail
Don't you know how much data you've read that you're about to decrypt? in your code template, you showed the sendign routine doing... nread = recv(sock, buffer, 25, 0); isn't the recieving routine doing somethign similar? well, nread would be the length you need, no? Yes it's

Re: Cannot encrypt text - need help

2011-05-01 Thread David Schwartz
On 5/1/2011 3:31 AM, derleader mail wrote: So I need a high performance solution that can handle many connections with little server load. 1. SSL is a good solution but is not high performance - it's more suitable for encryption of a web page. When establishing connection more that 100

RE: Cannot encrypt text - need help

2011-05-01 Thread Dave Thompson
From: owner-openssl-us...@openssl.org On Behalf Of David Schwartz Sent: Sunday, 01 May, 2011 06:03 On 5/1/2011 1:34 AM, derleader mail wrote: I'm going to use stream protocol - TCP/IP. Here is the template source code of the server without the encryption part We mean application

RE: Desperate help on RSAError

2011-05-01 Thread Dave Thompson
From: owner-openssl-us...@openssl.org On Behalf Of Diego Salazar Sent: Friday, 29 April, 2011 17:39 Hi there, I've been searching for a solution to this problem for 3 days. I'm using the ruby openssl module to encrypt/decrypt small amounts of data with 2048 bit mod key.

Problem with x509 certificate created using OpenSSL on iOS

2011-05-01 Thread Mike Markley
I've created an x509 certificate using the sample code provided in mkcert.c. The certificate works fine in doing the basic SSL handshake and I can use i2d_x509 to extract the bytes and then convert it back to d2i_x509 and print it using X509_print_fp. For some reason though if I try to convert it

How I can find URI for this ca certificate?

2011-05-01 Thread Akash Deo
Hi, I am trying to verify whether a ca signed certificate is revoked. Openssl verify option requires following parameters: - cert : A ca signed certificate to be verified. - cafile: FilePath to ca certificate used to sign the certificate (cert). *How I can find URI for this ca