2 ms·
This command line turns the two files everybody on the rest of the Internet cares about into the single file that Microsoft, in its unvarying quest to be differ
by tialaramex 8y ago
This command line turns the two files everybody on the rest of the Internet cares about into the single file that Microsoft, in its unvarying quest to be different for no reason, has decided is the right choice for their software.
Specifically you've got a Private Key (which your servers need, but you mustn't show to anybody and so must be very careful to protect) and a Certificate (which is a public signed document and it's fine to show it to anybody, if you lose it you can just get another copy). Completely different security profiles so it makes sense to keep them separate even though you need both...
And then Microsoft says OK, let's use RSA's (the company not the algorithm) PKCS #12 to bundle these two items together into a PFX file. Now we've got a file that we'll call a "certificate" but in fact must be kept private at all times and not shown to anybody.
The worst thing about PFX / PKCS #12 is that as here you're usually going to see it because somebody skipped the vital step that actually makes any of Public Key security worth having. The Subject / Applicant should always generate their own keys. If you let the Certificate Issuer make the keys, the whole enterprise is basically a charade because instead of just acting as an Authority, now they're proxying for you entirely, if they want to impersonate you they can trivially do so at any time. Security goes out the window.
One of the great things about Let's Encrypt is that they illustrated that you can do this right (Let's Encrypt never sees your private keys, indeed if you mistakenly present them they'll revoke your certificate on the rationale that now the keys are revealed and the cert is worthless) without making the end user jump through technical hoops like typing in OpenSSL commands they don't understand. Your keys are made on your machine, but unless you care you don't need to know about it.
- orev 8y agoIt was a rhetorical question. The fact that you needed 5 paragraphs to explain what is going on only proves the point being made — that it is not easy for anyone who doesn’t already have an intimate knowledge of PKI.
- tialaramex 8y agoSure, but this file and the command to produce it aren't anything to do with HTTPS really, they're artefacts of the Microsoft corporation's long-standing belief that refusing to interoperate helps you lock people into your ecosystem. Troy wouldn't need this file, and thus this command, except that (as HN readers sometimes forget) he's a Microsoft MVP and so even when it's clearly the wrong choice he has to pimp the Microsoft approach if possible. A better use of Troy's time as an MVP in _my_ opinion would have been to lobby Microsoft's IIS team to get ACME integration patched into recent releases ASAP‡. If this news item was "Troy's new video demos previously unannounced ACME integration for IIS 10" then it'd actually make an impact which this (unpaid) advertisement for Cloudflare does not. ‡ Bonus points since IIS is a commercial product, cut a deal to get your paying customers one free cert from a commercial CA using the new integration.