<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Windows PKI blog : S/MIME</title><link>http://blogs.technet.com/pki/archive/tags/S_2F00_MIME/default.aspx</link><description>Tags: S/MIME</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Outlook S/MIME certificate selection</title><link>http://blogs.technet.com/pki/archive/2008/12/17/outlook-s-mime-certificate-selection.aspx</link><pubDate>Wed, 17 Dec 2008 18:42:23 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3170327</guid><dc:creator>MS2065</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/pki/comments/3170327.aspx</comments><wfw:commentRss>http://blogs.technet.com/pki/commentrss.aspx?PostID=3170327</wfw:commentRss><description>&lt;p&gt;Consider that you are sending an encrypted eMail to a recipient who has multiple certificates stored in Active Directory. The key question is: Which certificates are selected by Outlook 2003/2007?&lt;/p&gt;  &lt;p&gt;When sending an encrypted eMail, Outlook actually requires two certificates. One certificate is owned by the recipient and one is owned by the sender. The recipient’s certificate is used by the sender for encrypting the eMail which is sent out. The sender’s certificate is used by the sender to encrypt the eMail that is stored in the &lt;em&gt;Sent Items&lt;/em&gt; folder in Outlook.&lt;/p&gt;  &lt;p&gt;For background information about digital certificates and Active Directory Attributes see the &lt;a href="http://technet.microsoft.com/en-us/library/aa996408(EXCHG.65).aspx"&gt;General PKI Planning Considerations&lt;/a&gt; on Microsoft TechNet.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Finding a valid certificate owned by the recipient&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;To find a valid certificate owned by the recipient, Outlook verifies if any certificates are stored in the &lt;em&gt;userSMimeCertificate&lt;/em&gt; attribute in Active Directory. If so, Outlook examines the PKCS#7 blobs to find out if Outlook is the one that published them. In that case, there is an extra signed attribute that indicates which is the default certificate. If the certificate marked as default is found in the &lt;em&gt;userSMimeCertificate&lt;/em&gt; attribute, it is chosen. If the default certificate is not found, the first valid certificate in the store is selected. In case the &lt;em&gt;userSMimeCertificate&lt;/em&gt; attribute stores no certificates, Outlook queries the &lt;em&gt;userCertificate&lt;/em&gt; attribute in Active Directory. The first non expired certificate that carries the &lt;em&gt;Secure Email&lt;/em&gt; OID 1.3.6.1.5.5.7.3.4 in the &lt;em&gt;Enhanced Key Usage &lt;/em&gt;and has the appropriate key usage is used. In case of message encryption, the &lt;em&gt;Key Usage &lt;/em&gt;must be equal to &lt;em&gt;Key Encipherment (20)&lt;/em&gt; while for message signing the Key Usage must match &lt;em&gt;Digital Signature (80)&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Finding a valid certificate owned by the sender&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;Outlook accepts the certificate that the user selected in the &lt;em&gt;Security Settings&lt;/em&gt; unless the certificate is invalid. If the certificate is invalid, Outlook tries to find the certificate that is closest to the bad one. The selection code looks for a valid certificate from the same issuer (in case the certificate in the &lt;em&gt;Security Settings&lt;/em&gt; just got renewed) and if one is found, it puts it into the &lt;em&gt;Security Settings&lt;/em&gt;. If the Outlook profile contains no valid &lt;em&gt;Security Settings&lt;/em&gt; or there are no &lt;em&gt;Security Settings&lt;/em&gt; at all, then the &lt;em&gt;Security Settings&lt;/em&gt; are (re)created with certificates that have the longest time before expiration and are dual purpose. Basically Outlook picks the certificate that will expire last and if there are multiple of those it picks the one that can be used for signing and encryption.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Forcing Outlook to create the Security Settings&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;See the following Microsoft Knowledge Base articles to automatically configure Outlook for S/MIME support:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Outlook 2007 post-Service Pack 1 hotfix package: January 28, 2008 (&lt;a href="http://support.microsoft.com/kb/941275"&gt;http://support.microsoft.com/kb/941275&lt;/a&gt;)       &lt;ul&gt;       &lt;li&gt;Note: there might be a more recent hotfix package including this functionality &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;After you obtain an S/MIME certificate, no button is available to sign or to encrypt e-mail messages in Outlook 2003 (&lt;a href="http://support.microsoft.com/kb/948076"&gt;http://support.microsoft.com/kb/948076&lt;/a&gt;)&lt;/li&gt; &lt;/ul&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3170327" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/pki/archive/tags/S_2F00_MIME/default.aspx">S/MIME</category></item></channel></rss>