 |
|
 |
recently I've experienced some weird crashes inside crypt32dll...with a digital certificate stored on an usb device.
if you do
Navigate(someURL){
CSslConnection inetSec;
etc...;
}
and call Navigate() many times..it will crash after a while in crypt32.dll!CertGetCertificateContextProperty...call-stack coming from wininet. when the cached certificate gets somehow cleared from wininet cache.
the solution is to use a global PCCERT_CONTEXT and pass it to each CSslConnection; at the end, when you don't need to navigate,close the certificate CertFreeCertificateContext() and the store.
I think the reason is that wininet caches somehow the certificate after the first use..and you destroy it in ~CSslConnection..but for some strange reasons wininet uses it for a while until the memory get's filled with garbage. then u'll have a gpf.
|
|
|
|
 |
|
 |
also, you may wish to call SetClientCert() before HttpSendRequest...some time ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED it's no more called after you successfully set
InternetSetOption(m_hRequest, INTERNET_OPTION_CLIENT_CERT_CONTEXT,...
for the first time. you will receive ERROR_INTERNET_CONNECTION_RESET not knowing why. wininet will use the first cached certificate, which may not be available if you remove a hardware stored certificate meanwhile.
|
|
|
|
 |
|
 |
You have strings for them, but you left out the methods and code to set them.
void SetPassword(string& strPassword){m_strPassword = strPassword;};
void SetUserName(string&strUserName){m_strUserName = strUserName;};
|
|
|
|
 |
|
 |
I am trying to get a better understanding of the SSLV3/TLS protocol. I believe I have all the parameters set up correctly but when the HttpSendRequest() is issued, the protocol as observed with WireShark is SSLV2 NOT SSLV3 for the "CLIENT HELLO" message.
I have written a little C program using the WinInet API and built it with VS 2005 Version 8 and >NetFramework Version 2. I loaded the executable on a PDA running CE 5.0.
The HTTP stuff I wrote using the WinInet API works fine.
What parameters or setting might I be missing?
Bill
|
|
|
|
 |
|
 |
It's critical to understand that a SSLv2 format handshake can contain the offer of SSLv3 and TLSv1 algorithms.
Only if you actually disable SSLv2 will you get the SSLv3 format handshake.
|
|
|
|
 |
|
 |
hi all
please, i need help in how can i extract/read data/properties from tomcat server (using Java Servlet) with SSO (Single sign on).
please
urgently
|
|
|
|
 |
|
 |
If running on the PC using file system FAT 32, it works well.
But if running on the PC using file system is NTFS, it's fail when sending request.
Note: PC OS is Windows XP SP2
int result = HttpSendRequest(m_hRequest, NULL, 0, NULL, 0); //-> fail
GetLastError()-> return error code: 12157
I don't know why?
|
|
|
|
 |
|
 |
Hi everyone,
I got an error 12029 with SendHttpsRequest. I`m a beginner. I only know the error 12029 means it can not be connected, but why? How to resolve it?
Any answer will be appreciated!
|
|
|
|
 |
|
 |
Make sure you use the correct HTTPS port. The port in sample code (9660) should be changed.
|
|
|
|
 |
|
 |
I am getting the error 12044 for httpsendrequest. Even though i set the certificate later it gives 12044 for each and every request. I am setting th ecertificate using internetsetoption. Can any body help how to solve this prblm. I am using 2003 server.
Thanks in advance,
Anitha
Anitha
|
|
|
|
 |
|
 |
When I tried to run your project, I got following 27 errors. Can you say what are these errors. I am a Newbie. SO please help me understand. Here is the output of compiling:
c:\program files\microsoft visual studio\myprojects\sslcon\sslcon.h(46) : error C2146: syntax error : missing ';' before identifier 'FindCertWithOUNITName'
c:\program files\microsoft visual studio\myprojects\sslcon\sslcon.h(46) : error C2501: 'PCCERT_CONTEXT' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\myprojects\sslcon\sslcon.h(60) : error C2146: syntax error : missing ';' before identifier 'm_hStore'
c:\program files\microsoft visual studio\myprojects\sslcon\sslcon.h(60) : error C2501: 'HCERTSTORE' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\myprojects\sslcon\sslcon.h(60) : error C2501: 'm_hStore' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\myprojects\sslcon\sslcon.h(61) : error C2146: syntax error : missing ';' before identifier 'm_pContext'
c:\program files\microsoft visual studio\myprojects\sslcon\sslcon.h(61) : error C2501: 'PCCERT_CONTEXT' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\myprojects\sslcon\sslcon.h(61) : error C2501: 'm_pContext' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio\MyProjects\SSLCon\SSLCon.cpp(17) : error C2065: 'm_hStore' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\SSLCon\SSLCon.cpp(19) : error C2065: 'm_pContext' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\SSLCon\SSLCon.cpp(130) : error C2065: 'CertFreeCertificateContext' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\SSLCon\SSLCon.cpp(134) : error C2065: 'CertCloseStore' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\SSLCon\SSLCon.cpp(134) : error C2065: 'CERT_CLOSE_STORE_FORCE_FLAG' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\SSLCon\SSLCon.cpp(157) : error C2065: 'CertOpenSystemStore' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\SSLCon\SSLCon.cpp(177) : error C2065: 'INTERNET_OPTION_CLIENT_CERT_CONTEXT' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\SSLCon\SSLCon.cpp(178) : error C2065: 'CERT_CONTEXT' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\SSLCon\SSLCon.cpp(189) : error C2143: syntax error : missing ';' before 'tag::id'
C:\Program Files\Microsoft Visual Studio\MyProjects\SSLCon\SSLCon.cpp(189) : error C2501: 'PCCERT_CONTEXT' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio\MyProjects\SSLCon\SSLCon.cpp(189) : fatal error C1004: unexpected end of file found
SSLConnection.cpp
c:\program files\microsoft visual studio\myprojects\sslcon\sslcon.h(46) : error C2146: syntax error : missing ';' before identifier 'FindCertWithOUNITName'
c:\program files\microsoft visual studio\myprojects\sslcon\sslcon.h(46) : error C2501: 'PCCERT_CONTEXT' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\myprojects\sslcon\sslcon.h(60) : error C2146: syntax error : missing ';' before identifier 'm_hStore'
c:\program files\microsoft visual studio\myprojects\sslcon\sslcon.h(60) : error C2501: 'HCERTSTORE' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\myprojects\sslcon\sslcon.h(60) : error C2501: 'm_hStore' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\myprojects\sslcon\sslcon.h(61) : error C2146: syntax error : missing ';' before identifier 'm_pContext'
c:\program files\microsoft visual studio\myprojects\sslcon\sslcon.h(61) : error C2501: 'PCCERT_CONTEXT' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\myprojects\sslcon\sslcon.h(61) : error C2501: 'm_pContext' : missing storage-class or type specifiers
Generating Code...
Error executing cl.exe.
SSLConnection.exe - 27 error(s), 0 warning(s)
Thanks for prompt reply.
Nikhs
Nikhil Trivedi
|
|
|
|
 |
|
 |
It is because it does not found the correct definitions, you must add the following lines:
#undef __WINCRYPT_H__
#define _WIN32_WINNT 0x0400
I put this lines at the beggining of the SSLCon.h
|
|
|
|
 |
|
 |
Hihi
Thanks for your work
And now the code success to request by post
but how to upload the file from my side to the server ?
thanks
Sam
|
|
|
|
 |
|
 |
the class have declare the httpupload
but can't found it in SSLCon.cpp
could you post it ?
|
|
|
|
 |
|
 |
What can i change the code to let it work on SSL V3 ?
when i use it to get a text page with SSL V3 certificate. it return "Cannot perform http request Code : 12037"
Thanks!
|
|
|
|
 |
|
 |
I get an error: Cannot perform http request, client authentication needed, invalid client certificate is used Code: 12045.
Can anyone help me?
Martin
|
|
|
|
 |
|
 |
http://support.microsoft.com/default.aspx?scid=KB;en-us;q182888
it solves the problem
|
|
|
|
 |
|
 |
Perfect, thanks.
Observe that where it is said 'hReq' in the article, it means the attibute m_hRequest
|
|
|
|
 |
|
 |
Hi,everyone,
I got following message :
Cannot perform http request, client authentication needed, invalid client certificate is used Code: 12045.
Could you tell me how to solve this error?
Thanks
Victor
|
|
|
|
 |
|
 |
http://support.microsoft.com/default.aspx?scid=KB;en-us;q182888
it solves the problem
|
|
|
|
 |
|
 |
I am trying to send certificate information from a certificate that was provided by a host server, (via email). I install it on my machine from a self-signing certificate that was provided. After it is installed, I want to know how to use the certificate information to communicate to the host server utilizing the openSSL in C++. Does anyone know how I would accomplish this. I currently am able to get the information from the host electronically using the openSSL toolkit, but now I need to load this from the file instead of online.
hbernstein@datavantagecorp.com
|
|
|
|
 |
|
 |
hi all,
i am passing the request to the Server as XML but i get the response from the server as "XML PARSE ERROR". i tried parsing the XML using MSxml parser but there was no error.
If any of you have tried or faced this problem using wininet and solved the problem please tell me the steps to fix the problem and also tell me
How can we set the Client Certificate?
Regards,
Vinod.
|
|
|
|
 |
|
 |
i use this to msn, when send ”GET /rdr/pprdr.asp HTTP/1.0“, but i get response is ”500“! can you help me? thanks!! study msn
|
|
|
|
 |
|
 |
Hi all,
I have to code for client certification in ASP.Net but i dont want to use WinHTTP for it.
Any help!!!!!!!!
Amit
Regards
Amit
|
|
|
|
 |
|
 |
Hi all,
I want to develop a web server with SSL security.
I have tried with the normal TCP/IP client-server application. It has worked fine. But now I want it to be done for web server and browser.
The code on server side works fine. I am calling a method of SslStream class called authinticateserver(),in previous case the client side application was having the authinticateclient() method which in turn was giving some response regarding the security.
But now as have browser as client how can I response to server that client has authinticated the server.
Or is there any other way to implement this.
Thank you.
Bye!
|
|
|
|
 |