Re: [openssl.org #3229] Fwd: Issue with key length

2014-01-11 Thread Som M
[openssl.org #3229] Yes, I suspected the same. But even though it returns 129, I prepended "00" to the hex string and sent it as argument to to RSA_verify. authMsgLen = RSA_size(rsa_pb); authMsgHexStr = "00" + authMsgHexStr; RSA_verify(NID_md5, digest, MD5_DIGEST_LENGTH, (unsigned char *)a

Re: Decrypting CMS message without headers

2014-01-11 Thread Dr. Stephen Henson
On Fri, Jan 10, 2014, Nicholas Barone wrote: > Hello, > > I have a program running on Centos 6.4 with OpenSSL 1.0.1 that is sending > and receiving messages with another system, written in Java. I encrypt the > data using the following command: > > # openssl cms -encrypt -binary -aes128 -in mes

Re: How to determine when data is finished on an SSL socket

2014-01-11 Thread Matthew Donald
When in doubt, use the source - or in this case RFC2616 ยง4.4. TL;DR version - the length is indicated by one of three situations: 1. A Content-Length header exists 2. Transfer-Encoding is "chunked", in which case each chunk (there can

Re: How to determine when data is finished on an SSL socket

2014-01-11 Thread M. V.
Hi Matthew, but from what I know, not all HTTP responses have "Content-Length" field. responses with "chunked" payload are one of them. what can I do then? Thank you. On Saturday, January 11, 2014 1:23 PM, Matthew Donald wrote: Sockets (SSL or otherwise) are layer-3 objects while conten

Re: How to determine when data is finished on an SSL socket

2014-01-11 Thread chris . gray
Matthew Donald scripsit: > Sockets (SSL or otherwise) are layer-3 objects while content is a layer-7 > object. To get an accurate end-of-content marker, you'll need to parse the > output, buts since you are using the https protocol, that's going to be easy. > Essentially, parse out the "Content-L

Decrypting CMS message without headers

2014-01-11 Thread Nicholas Barone
Hello, I have a program running on Centos 6.4 with OpenSSL 1.0.1 that is sending and receiving messages with another system, written in Java. I encrypt the data using the following command: # openssl cms -encrypt -binary -aes128 -in message.msg key.pem My encrypted message looks like the follow

Re: How to determine when data is finished on an SSL socket

2014-01-11 Thread Matthew Donald
Sockets (SSL or otherwise) are layer-3 objects while content is a layer-7 object. To get an accurate end-of-content marker, you'll need to parse the output, buts since you are using the https protocol, that's going to be easy. Essentially, parse out the "Content-Length" header and read that many

How to determine when data is finished on an SSL socket

2014-01-11 Thread M. V.
Hi everybody, I'm writing an application that creates multiple non-blocking SSL connections to an https server, in each one I send a request and read the server's response. my problem is, whatever I do, I can't determine when the response data is finished. here's part of my code responsible f