Andrew Urquhart

@andurq
4 Followers
130 Following
1.2K Posts
Undercover Northerner. South West UK
A farmer discovered two types of beetles eating his crop, but he didn't mind the smaller kind, as they were the lesser of two weevils. #joke
A couple of phone photos from last night - #Cadair Idris on the horizon #MidWales #Wales
Life's a journey. Don't forget to catch the bus.
#SilentSunday North Wales

Then in the (#javascript) application, after the .open() method is called, do:

objHTTP.setOption(3) = "LOCAL_MACHINE\\My\\nameOfYourCertificate";

At that point we could make the same API calls we made yesterday. Weird.

To create the certificate, open an Admin Powershell console:

New-SelfSignedCertificate `
-DnsName "nameOfYourCertificate" `
-KeyAlgorithm RSA `
-KeyLength 2048 `
-CertStoreLocation "Cert:\LocalMachine\My" `
-NotAfter (Get-Date).AddYears(10)
certlm.msc

Expand Personal > Certificates
Right click on "nameOfYourCertificate"
All Tasks > Manage Private Keys
[Add]
"Network Service"
✔ Read
❌ Full Control
[OK]
Close window

A very geeky thread about an extremely niche issue involving the #OpenAI #API, #ServerXMLHTTP or #WinHTTP requests and a self-signed certificate.

Until yesterday we could make simple API calls to the OpenAI API with our API token and all was well. That broke as of today with error "A certificate is required to complete client authentication".

The obscure fix has been to create a self-signed certificate and invoke it against the HTTP request.

Details to follow...

Taking a rest in July
A frozen puddle, earlier in the week