Thanks EVOEx, OpenSSL did the trick.
Are you (or anyone else) aware of any service or website I can send a HTTPS POST to that returns the data I sent (for troubleshooting/verification purposes)? I'm having some troubles because I think the data I'm sending is for some reason not what it should be when it's being received by the server.
Could it perhaps be using a different type of encryption algorithm or something and it's causing it to be decrypted into garbage therefore giving invalid output? The SSL_write function tells me I'm sending the correct number of bytes but the response from the HTTPS server isn't what it should be...
Thanks!
Edit: Let me explain the situation. My program is communicating with a secure payment server. This server reads a string sent to it and strips it of its contents. Basically the string I send to the server is something like this:
Code:
POST /paypage HTTP/1.1
Host: the.server.com:443
amount=100&identifier=MYIDNUMBER&access=123456789
Normally when you submit a transaction the server will respond with the values you sent to it for a receipt:
Code:
HTTP/1.1 200 OK
Date: Thu, 22 Apr 2010 12:22:24 GMT
Server: ***
Expires: Sun, Jul 1990 00:00:00 GMT
Pragma: no-cache
Cache-Control: no-cache
Content-Length: 153
P3P: CP="NOI DSP COR CURa ADMa TA1a OUR BUS IND UNI COM NAV INT"
Keep-Alive: timeout=120, max=100
Connection: Keep-Alive
Content-Type: text/plain;charset=iso-8859-1
set-cookie: citrix_ns_id=ujS8Knmlb/NAAHx59/ilZXQ3gO0A0; domain=.server.com; path=/
amount=100&identifier=... etc
However the response from the server is something like so:
Code:
amount=0&identifier=0&message=required field blah is missing
Which indicates to me that the data (for some reason) is not being received as it should be, for example the amount should have been returned as 100 since I've sent it as 100, and so fourth. And that error shouldn't appear because I was sending the field it is saying is missing.