Update the documentation pages

This commit is contained in:
OpenIddict Bot 2021-06-24 00:06:34 +00:00
parent 8aae9d5d14
commit f81f2dbd7b
2 changed files with 17 additions and 7 deletions

View File

@ -132,18 +132,28 @@ Certificates can be generated and self-signed locally using the .NET Core <code>
<pre><code class="lang-csharp">using var algorithm = RSA.Create(keySizeInBits: 2048); <pre><code class="lang-csharp">using var algorithm = RSA.Create(keySizeInBits: 2048);
var subject = new X500DistinguishedName(&quot;CN=Fabrikam Encryption Certificate&quot;); var subject = new X500DistinguishedName(&quot;CN=Fabrikam Encryption Certificate&quot;);
var request = new CertificateRequest(subject, algorithm, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1); var request = new CertificateRequest(subject, algorithm,
request.CertificateExtensions.Add(new X509KeyUsageExtension(X509KeyUsageFlags.KeyEncipherment, critical: true)); HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
request.CertificateExtensions.Add(new X509KeyUsageExtension(
X509KeyUsageFlags.KeyEncipherment, critical: true));
var certificate = request.CreateSelfSigned(
DateTimeOffset.UtcNow,
DateTimeOffset.UtcNow.AddYears(2));
var certificate = request.CreateSelfSigned(DateTimeOffset.UtcNow, DateTimeOffset.UtcNow.AddYears(2));
var data = certificate.Export(X509ContentType.Pfx, string.Empty); var data = certificate.Export(X509ContentType.Pfx, string.Empty);
</code></pre><pre><code class="lang-csharp">using var algorithm = RSA.Create(keySizeInBits: 2048); </code></pre><pre><code class="lang-csharp">using var algorithm = RSA.Create(keySizeInBits: 2048);
var subject = new X500DistinguishedName(&quot;CN=Fabrikam Signing Certificate&quot;); var subject = new X500DistinguishedName(&quot;CN=Fabrikam Signing Certificate&quot;);
var request = new CertificateRequest(subject, algorithm, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1); var request = new CertificateRequest(subject, algorithm,
request.CertificateExtensions.Add(new X509KeyUsageExtension(X509KeyUsageFlags.DigitalSignature, critical: true)); HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
request.CertificateExtensions.Add(new X509KeyUsageExtension(
X509KeyUsageFlags.DigitalSignature, critical: true));
var certificate = request.CreateSelfSigned(
DateTimeOffset.UtcNow,
DateTimeOffset.UtcNow.AddYears(2));
var certificate = request.CreateSelfSigned(DateTimeOffset.UtcNow, DateTimeOffset.UtcNow.AddYears(2));
var data = certificate.Export(X509ContentType.Pfx, string.Empty); var data = certificate.Export(X509ContentType.Pfx, string.Empty);
</code></pre><p>The best place to store your certificates will mostly depend on your host:</p> </code></pre><p>The best place to store your certificates will mostly depend on your host:</p>
<ul> <ul>

View File

@ -5637,7 +5637,7 @@
"output": { "output": {
".html": { ".html": {
"relative_path": "configuration/encryption-and-signing-credentials.html", "relative_path": "configuration/encryption-and-signing-credentials.html",
"hash": "22Qc2JwWKL314U4Wddl0IQ==" "hash": "lvfp+KasSL8PFb2HTzMYhQ=="
} }
}, },
"is_incremental": false, "is_incremental": false,