Results 1 to 3 of 3

Thread: Good question - Winhttp and certificate

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 1999
    Location
    Ottawa
    Posts
    155

    Unhappy Good question - Winhttp and certificate

    Hi all,
    I am using Winhttp to connect to an HTTPS website (secure). The website requires a client to be sent. Now, if I make a VB porgram and run it on my computer, I am able to get the program to connect and send the client certificate to the HTTPS website. Now, my problem is that, I made this whole connection process as a DLL. I tested this dll from a VB application and it works great. If I try to do the same with ASP, meaning if I try to call the DLL from ASP, it works great for normal connections but not connections that require sending of certificates! I get 'a certificate is required to complete the connection' error from HTTPS if I try it from the web (ASP) or calling the DLL from ASP. This may be very confusing and I tried it on different machines and same thing.

    My theory is that winhttp is unable to get certificates from the certificate store when it's called from ASP. Simply for (maybe) permission issues. Where are certificates stored? I know they are in the registry, but where exactly? I need heklp please. I do not get why winhttp is unable to send a certificate using ASP but can do it when called from VB normally or as a DLL.

    thanks. Any help will do.

  2. #2
    Addicted Member
    Join Date
    Feb 2003
    Posts
    237
    I would also bet that it problem with permissions

    see if you can use exported certificate located in webroot

    internet options - > content -> certificates

    you may also be able to help find problem by running regmon from
    sysinternals.com and watch for access denied messages
    Free Code, papers, tools, and more

    http://sandsprite.com

  3. #3
    New Member
    Join Date
    Jun 2005
    Posts
    1

    Re: Good question - Winhttp and certificate

    Hi ,
    I have developed an application using Winhttp to connect to an HTTP Website its working fine . Now i am converting to HTTPS i have installed the client certificates on my local machine.

    WinHttpReq.Open "GET", websiteURL, False
    HTTPREQUEST_SETCREDENTIALS_FOR_SERVER = 0
    WinHttpReq.SetClientCertificate "LOCAL_MACHINE\Personal"
    WinHttpReq.Send

    When we use clientcertificate is it necessary to give the username and password also?

    I am really confuse in the setclientcertificate argument. How would i know in which location its installed. I think i am not correct in the path.
    I am getting an error "A certificate is required to complete client Authentication"

    Thanks In Advance.
    Any help would be appreciated
    jaba
    Last edited by jabaraj; Jun 16th, 2005 at 09:56 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width