need help with posting tweets HTTPS request with ssl
Hi,
I'm an intern at an IT frim and my first duty is to make an console app that sends tweets. I successfully created my header and right now I can sent my HTTPS posts with the header I created . But having an authroization problem altough I'm sure I have correct token and secret values. So I made a research and I found information in this site that says I should use cipher and certificates. My question is since I already installed openssl(havent written any extra code for it but ot having any ssl errors) should I do anything extra and if I should could you please show me how to add cipher(rc4) and certificate(cacert.pem I guess) to my request.
I found about sslsocket but can I add query and http header to it?
Here is the code :
Code:
QNetworkRequest request(url);// url is "https://api.twitter.com/1.1/statuses/update.json"
request.setRawHeader(O2_HTTP_AUTHORIZATION_HEADER, buildAuthorizationHeader(oauthParams));
request.setHeader(QNetworkRequest::ContentTypeHeader, O2_MIME_TYPE_XFORM);
// manager->post(request, postData);
note: my requests seems right since I can do the pin and token gathering processes
thanks :)
Re: need help with posting tweets HTTPS request with ssl
Re: need help with posting tweets HTTPS request with ssl
hey,
thank you for your suggestion I added an cacert and cipher using the info you gave my cipher is rc4-sha and my cacert is from this site and is called Class 3 PKI Key Intermediate Certificate (PEM Format). but now I'm having . do you people any idea about this?
Re: need help with posting tweets HTTPS request with ssl
Where are you getting the value zero from?
Zero from QNetworkReply::error() is no errror.
Re: need help with posting tweets HTTPS request with ssl
I'm sending my post to the twitter api and I get an http status code 0 from there. I used to get codes like 401 not authorized but now all I get is http status code 0. I added cipher(rc4-sha) ,certificate(cacert) , and protocol(sslv3) but still having the same problem
thanks anyway :)
Re: need help with posting tweets HTTPS request with ssl
What is the raw text of the entire response? Are there valid HTTP headers or just a dropped connection?
Ensure that the form of your POST body is correct.
Have you tried putting Fiddler between your application and the Twit servers to observe the raw interaction? (Yes, it can MITM your SSL)
Re: need help with posting tweets HTTPS request with ssl
this is the reply I get from twitter. this happens at the last (posting tweet) phase. other than that receiving replies from twitter works and I can get my oauth data. my request is correct atleast the headers and the body since it works perfectly with the cUrl. my problem is I still dont know how to send a post with ssl. as far as I know I need to include cacert.pem and make handshake with the host. If you can help me with a working https post or a libcurl implementation that would be great.