<p>In all <a href="https://docs.traefik.io/v1.7/user-guide/examples/" rel="nofollow noreferrer">docs</a>, it is mentioned to add .crt and .key to traefik.toml.</p>

<p>In my case, I just have a .p12 file, it is possible to use a .p12 with traefik? </p>

Juliatzin
<p>Let me start with <a href="https://serverfault.com/a/9717/477518">differences</a> between formats. Thanks to @sysadmin1138 for great explanation.</p>
<blockquote>
<p>PEM - Governed by RFCs, its used preferentially by open-source
software. It can have a variety of extensions (.pem, .key, .cer,
.cert, more)</p>
<p>DER -
The parent format of PEM. It's useful to think of it as a binary
version of the base64-encoded PEM file. Not routinely used very much
outside of Windows.</p>
<p>.pkcs12 .pfx .p12 - Originally defined by RSA in the Public-Key
Cryptography Standards (abbreviated PKCS), the &quot;12&quot; variant was
originally enhanced by Microsoft, and later submitted as RFC 7292.
This is a passworded container format that contains both public and
private certificate pairs. Unlike .pem files, this container is fully
encrypted.</p>
</blockquote>
<p>The main info about .p12 - it is fully encrypted  and passworded container.</p>
<p>Take a quick look into <a href="https://github.com/containous/traefik/blob/424e2a9439f8f3b00d7f9f19ed1df3b6d3c8c570/pkg/tls/certificate.go" rel="nofollow noreferrer">traefik certificate.go</a></p>
<p>Package <code>tls</code> use only <a href="https://golang.org/pkg/crypto/tls/" rel="nofollow noreferrer">crypto/tls</a> and <a href="https://golang.org/pkg/crypto/x509/" rel="nofollow noreferrer">crypto/x509</a>.</p>
<pre><code>package tls

import (
    &quot;crypto/tls&quot;
    &quot;crypto/x509&quot;
    ...    
)
</code></pre>
<p>Look at <a href="https://github.com/golang/go/issues/10621" rel="nofollow noreferrer">crypto/x509: reading certificates from PKCS12 files</a> github issue:
There was a try to add <code>PKCS12</code> cert support into <a href="https://golang.org/pkg/crypto/x509/" rel="nofollow noreferrer">crypto/x509</a> but in the end it was not implemented.</p>
<p>As it was mentioned in comments, right way is to convert .p12.</p>
<p>Here is <a href="https://serverfault.com/a/413836/477518">example</a> hot to achieve it (thank to @mulaz):</p>
<pre><code>openssl pkcs12 -in filename.pfx -nocerts -out filename.key

openssl pkcs12 -in filename.pfx -clcerts -nokeys -out filename.crt 
</code></pre>
<p>And a source of the same: <a href="https://sycure.wordpress.com/2008/05/15/tips-using-openssl-to-extract-private-key-pem-file-from-pfx-personal-information-exchange/" rel="nofollow noreferrer">Tips : Using openssl to extract private key ( .pem file) from .pfx (Personal Information Exchange)</a></p>
<p>Hope it helps!</p>
