Well, I've finally got the code-signing certificate. I'm now also qualified to hit my head against brick walls.
The notary business wasn't too onerous, passport, driving licence, telephone bill, bank statement, all norarised scanned and emailed by the notary to Comodo, they then do the automated telephone check, they give you a web page to visit which contains a box to enter a 6-digit number, they call you on the number on the telephone bill, tell you the 6-digit number, the certificate is issued within a few minutes.
That's when the next lot of fun starts. Collecting the certificate.
The instructions state you must use the same computer and browser you used when requesting the certificate. You must also use IE version 8 or higher. You cannot use Firefox, Chrome, Safari or Edge. Call this WTF moment number one.
They state that only IE8+ has the SHA-256 capabilities and also the ability to export your certificate to a usable certificate file. Chrome, Safari and Edge do not have these abilities at all. Firefox can get the certificate but cannot export it to a certificate file. D'oh. I had used Firefox to request the certificate. It is my normal browser. I would never use IE in a month of Sundays and forget Edge!
So I used IE and try to get the certificate - error ...
Error message - certificate can not be installed. then
ERROR 0x80092004: CertEnroll::CX509Enrollment::InstallResponse: Cannot find object or property. 0x80092004 (-2146885628 CRYPT_E_NOT_FOUND)
The various help files mention private keys, I don't have a private key, no mention of a private key was made in the application process.
However, looking in the certificate store I see it has been installed but not as a personal certificate, it is in the Other People section, so is unusable by me.
Next day ...
Ok, let's try Firefox, ooo , success, certificate installed, in the personal section, all looks ok, but, as the instructions say, there is no Export.
It's not until you dig deeper ...
Options -> Privacy & Security -> Certificates -> View Certificates
Find your certificate and select it, choose backup and save it as a .p12 file.
Wooo - almost.
I can sign exe and msi files using the kSign utility.
Visual Studio recognises the certificate and signs my build. Install into Visio 2016. Fine.
Run Visio - fail -
SignatureDescription could not be created for the signature algorithm supplied
Call this WTF moment number two.
I need a beer.