s365b.setup.certs

Self-signed certificates for app registration credentials.

Classes

AppCertificate

A key pair and certificate for one app registration.

Functions

new_certificate(common_name, *[, days]) → AppCertificate

Generate an RSA-3072 key and a self-signed certificate.

Module Contents

class s365b.setup.certs.AppCertificate[source]

A key pair and certificate for one app registration.

Variables:
  • private_key_pem – PKCS#8 PEM private key (store encrypted).

  • certificate_pem – PEM certificate (public; uploaded to Entra).

  • thumbprint – SHA-1 thumbprint as Entra shows it (hex).

  • not_after – Expiry.

  • der_base64 – Certificate DER, base64, as Graph keyCredentials wants.

private_key_pem: str[source]
certificate_pem: str[source]
thumbprint: str[source]
not_after: datetime.datetime[source]
der_base64: str[source]
s365b.setup.certs.new_certificate(common_name: str, *, days: int = 365) → AppCertificate[source]

Generate an RSA-3072 key and a self-signed certificate.

Parameters:
  • common_name – Certificate subject CN (shown in the Entra portal).

  • days – Validity in days.

Returns:

The certificate material.