Non-interactive login using VBA question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wellwellwell
    Junior Member
    • Sep 2014
    • 5

    #16
    Hi guys,

    I am trying to implement this code. It would save my day if I could make this work! Thanks for sharing it.

    It seems I managed to have my certificate registered by Windows. I don't get the complaint "A certificate is required to complete authentication". I suppose I am good with it (although I did do anything related to p12...).

    However, now I get the dreadful message on send:
    Method 'Send' of object 'IWinHttpRequest' failed

    Any clue as to what is going wrong?

    Comment

    • wellwellwell
      Junior Member
      • Sep 2014
      • 5

      #17
      p12 was the key.

      OK. I managed to make it work.

      p12 was the missing bit.

      To create the p12 file, one way is:

      openssl pkcs12 -export -in client-2048.crt -inkey client-2048.key -out client-2048.p12

      Great work guys!

      Comment

      • DTA
        Junior Member
        • Jul 2016
        • 2

        #18
        2 years later: thanks for the VBA code
        and my contribution:
        To any future visitors to this page looking to login non-interactively on a Windows-based machine and trying to use the guidelines from Betfair @ http://docs.developer.betfair.com/do...BetfairAccount

        2 things:
        1. Where it says: "Update or Create the openssl configuration file (openssl.cnf) for OpenSSL to override some of the default settings:"
        For a Windows user this translates to
        "open the cfg file you are using( cnf is for linux) in a text editor and append this section to the bottom"

        [ ssl_client ]
        basicConstraints = CA:FALSE
        nsCertType = client
        keyUsage = digitalSignature, keyEncipherment
        extendedKeyUsage = clientAuth

        2. with the line
        "-in client-2048.csr -signkey client-2048.key -out client-2048.crt -extfile openssl.cnf -extensions ssl_client"

        ignore the "-extfile openssl.cnf -extensions ssl_client" it seems to be for linux machines

        I found the guide @ "https://blog.didierstevens.com/2015/03/30/howto-make-your-own-cert-with-openssl-on-windows/#comment-355706" useful

        Comment

        • TheOlis
          Junior Member
          • Apr 2016
          • 2

          #19
          Hi DTA, are you using non-interactive login with certificate (code above)? What Windows are you using?

          Comment

          Working...
          X