rasenmaeher_api.cfssl.private

Private apis

Module Contents

Functions

post_ocsprest(url[, send_payload, timeout])

Do a POST with the mTLS client

dump_crlfiles()

Call ocsprest CRL dump

refresh_ocsp()

Call ocsprest refresh

sign_csr(csr[, bundle])

Quick and dirty method to sign CSR from CFSSL

sign_ocsp(cert[, status])

Call ocspsign endpoint

validate_reason(reason)

Resolve the given reason into the actual flag

revoke_pem(pem, reason)

Read the serial number from the PEM cert and call revoke_serial

revoke_serial(serialno, authority_key_id, reason)

Call the CFSSL revoke endpoint

certadd_pem(pem[, status])

Read the serial number from the PEM cert and call certadd

Attributes

LOGGER

ReasonTypes

LOGGER[source]
ReasonTypes[source]
async post_ocsprest(url, send_payload=None, timeout=None)[source]

Do a POST with the mTLS client

Parameters:
  • url (str)

  • send_payload (Optional[Dict[str, Any]])

  • timeout (Optional[float])

Return type:

None

async dump_crlfiles()[source]

Call ocsprest CRL dump

Return type:

None

async refresh_ocsp()[source]

Call ocsprest refresh

Return type:

None

async sign_csr(csr, bundle=True)[source]

Quick and dirty method to sign CSR from CFSSL params: csr, whether to return cert of full bundle returns: certificate as PEM

Parameters:
Return type:

str

async sign_ocsp(cert, status='good')[source]

Call ocspsign endpoint

Parameters:
Return type:

Any

validate_reason(reason)[source]

Resolve the given reason into the actual flag

Parameters:

reason (ReasonTypes)

Return type:

cryptography.x509.ReasonFlags

async revoke_pem(pem, reason)[source]

Read the serial number from the PEM cert and call revoke_serial Reason must be one of the enumerations of cryptography.x509.ReasonFlags

If path is given it’s read_text()d

Parameters:
Return type:

None

async revoke_serial(serialno, authority_key_id, reason)[source]

Call the CFSSL revoke endpoint

authority_key_id must be formatted in the way CFSSL expects it Reason must be one of the enumerations of cryptography.x509.ReasonFlags or it’s string values (see REASONS_BY_VALUE)

Parameters:
  • serialno (str)

  • authority_key_id (str)

  • reason (ReasonTypes)

Return type:

None

async certadd_pem(pem, status='good')[source]

Read the serial number from the PEM cert and call certadd endpoint

If path is given it’s read_text()d

Parameters:
Return type:

Any