mirror of
https://gitee.com/dcren/openiddict-documentation.git
synced 2025-07-15 23:13:34 +08:00
Update the documentation pages
This commit is contained in:
parent
8aae9d5d14
commit
f81f2dbd7b
@ -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("CN=Fabrikam Encryption Certificate");
|
var subject = new X500DistinguishedName("CN=Fabrikam Encryption Certificate");
|
||||||
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("CN=Fabrikam Signing Certificate");
|
var subject = new X500DistinguishedName("CN=Fabrikam Signing Certificate");
|
||||||
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>
|
||||||
|
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user