<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>


<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">

<p class="details" style="font-style: italic; color: #777;">
<a href="https://gitlab.com/dkg">Daniel Kahn Gillmor</a> created an issue:
</p>
<div></div>
<h2 dir="auto">
<a id="user-content-description-of-the-feature" class="anchor" href="#description-of-the-feature" aria-hidden="true"></a>Description of the feature:</h2>
<p dir="auto"><a href="https://tools.ietf.org/html/rfc4262" rel="nofollow noreferrer noopener" target="_blank">RFC 4262</a> indicates an X.509v3 extension for storing SMIME capabilities in an X.509 certificate.</p>
<p dir="auto"><a href="https://tools.ietf.org/html/rfc8551" rel="nofollow noreferrer noopener" target="_blank">RFC 8551</a> defines the values that can go in that extension.</p>
<p dir="auto">The extension OID is:</p>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">smimeCapabilities OBJECT IDENTIFIER ::=</span>
<span id="LC2" class="line" lang="plaintext">         {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)</span>
<span id="LC3" class="line" lang="plaintext">         pkcs-9(9) 15}</span></code></pre>
<p dir="auto">For example, a capability we might have could be represented in the certtool template, conditioned to only be requested if <code>email_protection_key</code> is set:</p>
<p dir="auto"><code>smime_compress_zlib</code> -- if it is set in the template, and <code>email_protection_key</code> is set, then it would add an S/MIME Capabilities X.509v3 extension (or append to any existing one), containing the <code>id-alg-zlibCompression</code> OID from <a href="https://tools.ietf.org/html/rfc3274" rel="nofollow noreferrer noopener" target="_blank">RFC 3274</a>:</p>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">      id-alg-zlibCompress OBJECT IDENTIFIER ::= { iso(1) member-body(2)</span>
<span id="LC2" class="line" lang="plaintext">        us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 8 }</span></code></pre>
<p dir="auto">and if <code>smime_authenc_aesgcm256</code> is set tin the template, and <code>email_protection_key</code> is set, then it would add an S/MIME Capabilities X.509v3 extension (or append to any existing one), containing the appropriate identifier from <a href="https://tools.ietf.org/html/rfc5084" rel="nofollow noreferrer noopener" target="_blank">RFC 5084</a>.</p>
<p dir="auto">(alternately, if you think the user should be able to set the ordering, we could define a fancier configuration syntax that knows a set of S/MIME capabilities, and allows the user to identify them in a list in the template, like so:</p>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">smime_capabilities = aesgcm256,zlib</span></code></pre>
<p dir="auto">But i think the single flag (and making sensible ordering choices) fits more closely with the current certtool template interface.</p>
<h2 dir="auto">
<a id="user-content-applications-that-this-feature-may-be-relevant-to" class="anchor" href="#applications-that-this-feature-may-be-relevant-to" aria-hidden="true"></a>Applications that this feature may be relevant to:</h2>
<p dir="auto">Using certtool-generated X.509 certificate for e-mail purposes with S/MIME.</p>
<h2 dir="auto">
<a id="user-content-is-this-feature-implemented-in-other-libraries-and-which" class="anchor" href="#is-this-feature-implemented-in-other-libraries-and-which" aria-hidden="true"></a>Is this feature implemented in other libraries (and which)</h2>
<p dir="auto">I believe this can be achieved by some complicated gymnastics in OpenSSL's configuration syntax, but</p>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #777;">

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/issues/863">view it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can
<a href="https://gitlab.com/sent_notifications/d267f1c60239471a016c9d9639578b07/unsubscribe">unsubscribe</a>
from this thread or
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Issue","url":"https://gitlab.com/gnutls/gnutls/issues/863"}}</script>


</p>
</div>
</body>
</html>