Corp Apps training · 45 minutes
Public-key crypto, PKI and TLS for the people who run our web, app and SQL servers.
Press → to advance · N for notes · F for fullscreen
Monday, 8:02 AM
The cert expired Saturday. Monitoring: none. Users: many.
Today
Shared keys, key pairs, signatures, hashes
What’s inside, chain of trust, public vs internal CAs
What it gives you and what happens on connect
IIS, SQL, Java, PHP, errors and bad habits
Part 1 · Crypto basics
The same key locks and unlocks. Fast enough to encrypt everything: web pages, SQL queries, file transfers. (AES)
How do we agree on the combination? If I email it to you, anyone reading the email has it too.
Part 1 · Crypto basics
An open padlock. Give it to anyone. If it leaks, nothing bad happens.
The only key that opens that padlock. Never leaves the server. If it leaks, anyone can pretend to be you.
The private key is the crown jewel. 👑
Part 1 · Crypto basics
| Job | How | Proves |
|---|---|---|
| Encrypt | Anyone locks with your public key. Only your private key unlocks. | Only you can read it |
| Sign | You sign with your private key. Anyone checks with your public key. | It came from you and wasn’t changed |
Signing is a wax seal 🕯️ Anyone can check it. Only you can make it. Certificates run on signing.
One does not simply
email the .pfx
Part 1 · Crypto basics
Every time, on every machine.
One character flips the whole hash.
You can’t get the data back from it.
You’ve seen these as cert thumbprints in IIS. Avoid MD5 and SHA-1.
Part 2 · Certificates
| Field | Example |
|---|---|
| Subject Alternative Names | app.rrc.qld.gov.au, app01.rrc.local ← the names it’s valid for |
| Issuer | The CA that signed it |
| Valid from / to | 2026-03-01 → 2026-09-17 |
| Public key | RSA 2048 / ECDSA P-256 |
| Signature | The issuer’s seal over all of the above |
Not in it: the private key. That lives separately on the server.
Browsers ignore the CN.
Only the SAN counts.
Change my mind.
Part 2 · Certificates
Self-signed. Offline. ~20 years. Pre-installed in your trust store.
Does the day-to-day signing.
On IIS, Apache, SQL…
The server must send its cert + the intermediate. The client already has the root.
Chrome: “Missing intermediate? I’ll just go fetch it.”
Java, PHP, curl: PKIX path building failed
“It works in Chrome” proves nothing.
Part 2 · Certificates
| Public CA | Internal CA | |
|---|---|---|
| Examples | DigiCert, Sectigo, Let’s Encrypt | [Our internal CA] |
| Trusted by | Every device in the world | Only our domain-joined machines |
| Names | Real public domains we own | Anything, incl. rrc.local |
| Use for | Public, phones, vendors, SaaS | Internal sites, server-to-server, SQL, LDAPS |
If anything outside our domain-joined fleet must trust it, it needs a public cert.
Part 3 · TLS
Nobody in between can read it.
Nobody can change it unnoticed.
You’re talking to the real server.
Under HTTPS, SQL Server, LDAPS, SMTP, RDP, WinRM, APIs and most SaaS integrations. “SSL” is just the old name.
Part 3 · TLS
“Hello. I speak TLS 1.3 / 1.2. I want app.rrc.qld.gov.au.”
“Here’s my cert + intermediate, and proof I hold the private key.”
Checks name, dates, chain, revocation. Any fail = stop.
Agree a session key without ever sending it (ECDHE).
Everything else is fast symmetric encryption. 🔒
Part 3 · TLS
Is the name I used in the SAN? Not by IP, short name or alias.
Not expired? Is the server clock right?
Leads to a root I trust? Intermediate sent?
Not cancelled? Can I reach the CRL/OCSP URL?
Work out which one failed. The fix is usually obvious.
Every sysadmin, every renewal cycle
Part 4 · Our servers
| Platform | Cert lives in | Watch out for |
|---|---|---|
| IIS | certlm.msc → Personal; site Bindings | Key icon present; SNI if sites share an IP |
| SQL Server | Windows store, picked in SQL Config Manager | Service account needs key access; new drivers validate by default |
| Apache / nginx / PHP | PEM files: cert, chain, key | Use the full-chain file; lock down the key |
| Java | Keystores + its own cacerts | Ignores the Windows trust store |
| Firewall / LB | Their own stores | TLS inspection re-signs outbound traffic [confirm] |
Part 4 · Our servers
.cer .crt .p7b .csr
.pfx .p12 .key (and some .pem)
If it has a private key in it, it’s a password.
Don’t email it, share it, commit it or ticket it. Best of all: generate the CSR on the server so the key never travels.
TrustServerCertificate=TruePart 4 · Our servers
| You see | Usually means |
|---|---|
ERR_CERT_DATE_INVALID | 📅 Expired (or clock wrong) |
ERR_CERT_COMMON_NAME_INVALID | 🏷️ Name not in SAN |
ERR_CERT_AUTHORITY_INVALID | ⛓️ Self-signed / untrusted CA / no intermediate |
unable to get local issuer certificate | ⛓️ Missing intermediate or CA not in app’s bundle |
PKIX path building failed (Java) | ⛓️ Same, import CA into cacerts |
| SQL: authority that is not trusted | ⛓️ Self-signed SQL cert, new driver validates |
Part 5 · Lifecycle
From 15 Mar 2026
200
days max
From 15 Mar 2027
100
days max
From 15 Mar 2029
47
days max
Manual renewal stops being practical. We’re moving to automated issuance (ACME) and an accurate cert inventory.
verify=False and move onPart 5 · Try it
Or click the padlock → Certificate → Certification Path.
Recap
Public key is public. Private key is a secret, and so is any .pfx or .key.
A cert is an ID card for a public key, signed by a CA we trust.
TLS uses certs to prove identity and agree a key, then encrypts fast.
Every error is name, date, chain or revocation.
Never fix a cert error by turning checking off.
Questions?
Notes and quiz: elearn.ziggi.dev/pki-tls
Cert requests: [process] · TLS questions: [contact]