Seems nobody has documented how to use step-ca to create certificates for S/MIME (e-mail)? OK. I guess I will have to go down that road unprepared and write it down as a gist or blog entry myself :) (Will take a few days, depending on when I find enough time to go through everything)

1/6

#SelfHost #eMail #SMIME #CA #x509

It shouldn't be complicated (famous last words ;). Just a x509 certificate with `keyUsage = contentCommitment, digitalSignature, keyEncipherment` and `extendedKeyUsage = emailProtection` and of course the `commonName` and `emailAddress` set ...

UPDATE: first little mystery solved. https://social.wildeboer.net/@jwildeboer/114964253139353077

2/6

#SelfHost #eMail #SMIME #CA #x509

Jan Wildeboer 😷:krulorange: (@[email protected])

Attached: 1 image TIL (Today I Learned): While openssl uses the identifier `nonRepudiation` for the 2nd bit in the keyUsage field in x509 certificates, the correct identifier since at least 2008 is `contentCommitment` according to the ITU TR and RFCs and so that is what step-ca uses. A bit (pun intended) confusing, but now I know :) https://www.rfc-editor.org/rfc/rfc5280#section-4.2.1.3 #NerdTalk

social.wildeboer.net

If you want to play with free S/MIME certs for e-mail signing and encryption, https://acme.castle.cloud does that letsencrypt style with ACME and certbot :) Made and operated by the Centre Tecnològic de Telecomunicacions de Catalunya (CTTC). A non-profit research institution based in Castelldefels (Barcelona).

3/6

#SelfHost #eMail #SMIME #CA #x509

ACME Email Free S/MIME - Get free S/MIME certificates!

Get a free S/MIME certificate through our ACME Email Server. Automatize S/MIME certification with our open-source ACME email client.

ACME Email Server

After some help from @ben and some swearing about PKCS12 (add a password when you package the .p12 file so that Android and iOS will be able to import it) and Keychain on MacOS, it’s working. S/mime signed and encrypted mails with certificates from my own CA.

4/6

#SelfHost #eMail #SMIME #CA #x509

If I understand the whole s/mime stuff correctly, I can send you a signed email and your mail client should be able to extract my public key from that. You reply with a signed mail, I can extract your public key. Now we can send encrypted emails :) Your mail client/operating system won't trust my certificate as it is signed by my CA (Certificate Authority), but it should still work.

5/6

#SelfHost #eMail #SMIME #CA #x509

I have brain dumped the process at https://codeberg.org/jwildeboer/gists/src/branch/main/2025/20250803SmimeCertStepCA.md and will work on an extended version as blog post in the next few days. Big shoutout to @ben again for getting the process up and running in the first place!

If you want to get a signed email from me to see what happens in your mail client, DM me an email address and I will send a s/mime signed email to you :)

6/6

#SelfHost #eMail #SMIME #CA #x509

gists/2025/20250803SmimeCertStepCA.md at main

gists - A collection of short notes on specific little things that are good to share and share but not yet enough for a blog entry. Mostly geeky stuff. Free to copy/paste, no restrictions from my side.

Codeberg.org
@jwildeboer @ben Is it theoretically possible for the client to do this itself with ACME? If so I wonder what this would look like for various clients.
@jwildeboer yep, and works a treat in stock macOS and iOS
@Synchro
When I helped a friend setup his Smime cert on iMail or whatever it's called we were both flabbergasted.
Imported the p12 into his system keychain and that's it???
No email-config or similar.
He was very happy
@jwildeboer
@jwildeboer Sounds very interesting. I'll have a closer look...

@jwildeboer to spare anyone else the false hope: it seems they’re not trusted by anyone else. At least they said this in 2020 [1] and there is no newer post about this changing. Still cool ofc.

[1] https://acme.castle.cloud/2020/11/16/welcome/

Welcome! - ACME Email Server

Today we start this adventure. Following the specs defined in the Email-Reply-00 ACME challenge, we implemented a whole and automatized system to deploy S/MIME certificates without user interaction. This would help to secure email communications by incorporating a unique signature. Users can also use this signature to encrypt their messages and ensure that any intruder… Read More »Welcome!

ACME Email Server
@jwildeboer Biggest downside, they use their own CA and it's not cross signed by reputable parties. It's nice as a test/PoC but nothing more.

@jwildeboer that sounds awesome. Just the other day I thought to myself: "Someone would need to do to Mails what Let's Encrypt did for Webservers".

Now the question is: What hinders the widespread adoption?

@jwildeboer I think they are feeling your post.
It is taking upwards of 10 minutes for their challenge mail to get through the queue they land in at GMail.