{{define "webmail_certs.html"}} Certs - Webmail {{template "csrf_script" .}}
{{range .flashes}} {{end}}

Certs

Two separate systems live here, each doing one job: S/MIME certificates sign outgoing mail (proves it came from you and wasn't altered) — PGP keys encrypt it (only the recipient can read it). They're different standards with different key formats; a message can use either, both, or neither. PGP private keys are protected by their own passphrase (never stored anywhere), so you'll be asked for it the first time you use one each session.
S/MIME Certificates — for signing
Your Certificates
{{if .identities}}
{{range .identities}} {{end}}
ExpiresActions
{{.NotAfter.Format "2006-01-02"}} Download
{{else}}

No S/MIME certificates yet. Generate a free self-signed certificate, or import one you already have (.p12/.pfx).

{{end}}
Generate New
Import Existing (.p12 / .pfx)
S/MIME Contact Certificates
{{if .contacts}}
{{range .contacts}} {{end}}
EmailAddedActions
{{.Email}} {{.CreatedAt.Format "2006-01-02"}}
{{else}}

No contact certificates yet. They're also captured automatically when you open a validly signed email from someone new.

{{end}}
PGP Keys — for encryption
Your Keys
{{if .pgp_identities}}
{{range .pgp_identities}} {{end}}
LabelFingerprintStatusActions
{{if .Label}}{{.Label}}{{else}}(no label){{end}} {{.Fingerprint}} {{if index $.pgp_unlocked .ID}}Unlocked this session{{else}}Locked{{end}} Download Public Key
{{else}}

No PGP keys yet. Generate a new keypair, or import one you already have (an ASCII-armored .asc export from e.g. GnuPG).

{{end}}
Generate New
Import Existing (.asc)
PGP Contact Keys
{{if .pgp_contacts}}
{{range .pgp_contacts}} {{end}}
EmailLabelFingerprintAddedActions
{{.Email}} {{.Label}} {{.Fingerprint}} {{.CreatedAt.Format "2006-01-02"}}
{{else}}

No contact keys yet. Ask a sender for their public key export, or grab it from a keyserver, and add it here before you can encrypt mail to them.

{{end}}
{{template "compose_widget" .}} {{end}}