Creating SSL certificates for S/MIME email encryption with Mac OS X and iOS
The easiest way to get a free SSL certificate for email encryption is to create a self-signed certificate with OS X Keychain Access.
Open Keychain Access (cmd-space to open Spotlight, type "keychain"). In the menu bar go to "Keychain Access" → "Certificate Assistent" → "Create a Certificate..."
Enter your name and select "Let me override defaults".
In the next step set the validity of your certificate. The default is 365 days, i.e. one year. I like to set it to a little more than four years so that I do not have to update my certificate too often.
Enter your email address next. Your name should already be set. The country is also already set. Clearing this field did not work for me: My certificate had my country set.
In the next step make sure the algorithm is set to RSA. RFC 5750 defines that S/MIME software must support RSA. DSA is just optional and may not work everywhere.
In the key usage extension select "Signature" and "Key Encipherment".
The extended key usage extension setting should already be correct: "This extension is critical" and "Email Protection" should be selected.
Do not include the basic constraints extension. You would only need to enable it to create your own certificate authority.
In the subject alternate name extension make sure your email address is set in the field "rfc822Name". RFC5750 defines that this field is the preferred way for email software to associate a certificate to an email address.
Finally save the certificate to your login keychain.
Even if you did not enter a country in step 4, you will notice that the certificate summary will still show a country for your certificate. This, most probably, is a bug in Keychain Access.
Enable your certificate for use in Mac OS X Mail
To be able to use your certificate in Mac OS X Mail you will have to edit the certificate's trust settings.
In Keychain Access look for your certificate and double-click it or select "Get Info" in the context menu.
Set "Always Trust" for "Secure Mail (S/MIME)" and "X.509 Basic Policy".
Now you should be able to send signed emails. A recipient of a signed email can decide to trust your certificate and send you encrypted email.
To encrypt your outgoing email you need to have the certificates of all recipients of that mail. Ask them to send you a signed email so you can add their certificates to your Keychain.