lawndoc / CAPy

A Certificate Authority microservice that can generate server/client certificates through an API interface
MIT License
7 stars 1 forks source link

Add API call for CSR #1

Open lawndoc opened 3 years ago

lawndoc commented 3 years ago

Create an API call that can accept PEM encoded CSR and Public Key and generate a certificate based on that.

We'll need to use cryptography.x509.load_pem_x509_csr() to convert the PEM encoded CSR to a csr object that ownca can recognize.

lawndoc commented 3 years ago

The ownca method corresponding to this functionality is ownca.ownca.CertificateAuthority.sign_csr()

lawndoc commented 3 years ago

I think it would also be a good idea to support DER encoding as well. cryptography.x509.load_der_x509_csr() is the DER counterpart to the method in my initial comment. It shouldn't be too hard to detect which was sent once it's received.