Skip to content

Certificates ​

Certificate helpers create self-signed certs and CSRs for Suite workflows — not a full PKI product.

Self-signed certificate (dev / lab) ​

csharp
using JASE.Crypto;

X509Certificate2 cert = Certificate.BuildCertificate(
    name: "dev.example.local",
    expiration: DateTime.UtcNow.AddYears(1),
    keySize: 2048,
    algorithm: AsymmetricAlgorithm.RSA,
    hash: HashProvider.SHA256);

Use this for local TLS or signing tests. Do not treat Suite self-signed certs as a production CA story.

Certificate signing request (CSR) ​

csharp
CsrResponse csr = Certificate.CreateCsr("mydomain.com"); // RSA defaults

// Hand csr.PemCsrRequest to your CA / registration authority.
// Keep the private key from the CsrResponse secret — it is not recoverable from the PEM CSR alone.
string pemRequest = csr.PemCsrRequest;

Customize algorithm / SANs via CreateCsr(subjectName, options, keySize, alternateNames, …) — see CreateCsr and ECDsaCertificateOptions / RsaCertificateOptions.

After a CA signs the request, Certificate.ProcessCsRequest(issuer, csrResponse, effective, expiration) builds the issued cert from the original CSR response.

When to use Suite helpers vs platform APIs ​

NeedPrefer
Quick Suite-aligned self-signed cert / CSRCertificate.BuildCertificate / CreateCsr
Full CA, ACME, Windows cert store policyPlatform / OS tooling (X509Store, external CA)
TLS handshake diagnostics against a live hostJASE.Network TLS helpers