You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature needed for letsencrypt to use us instead of M2Crypto #1957
Out of curiosity, where does this list come from? From Let's Encrypt's website and GitHub repository, it looks like the server-side code is written in Go...
It's based on me manually reading through:
github.com/letsencrypt/lets-encrypt-preview
On Mon, May 18, 2015 at 10:00 PM, André Caron [email protected]
wrote:
Out of curiosity, where does this list come from? From Let's Encrypt's
website and GitHub repository, it looks like the server-side code is
written in Go...
—
Reply to this email directly or view it on GitHub #1957 (comment).
"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: 125F 5C67 DFE9 4084
Since I'm expecting for it to take a few days before the CSR builder is reviewed and suitably prepared for final submission, I might tackle the few remaining things in this list. In order to accelerate the process, you might be able to give me a bit of insight on how you see this added to the library.
What's missing for SHA256 support? I suspect this might already be supported out of the box. Should I just add some tests and see if it works?
For the CSR and certificate validity checks, would the following interface be correct?
class Certificate:
def verify(self, public_key):
"""
Verify the certificate's signature using the issuer's public key.
"""
class CertificateSigningRequest:
def verify(self, public_key):
"""
Verify the request's signature using the subject's public key.
"""
SHA256 will Just Work™ when your PR lands so yeah, that'll be fine. You're welcome to add a test (more tests never bad) though!
The interface for CSR validity looks likely to be good as that's a simple problem.
Certificate validity is a rabbit hole I'm terrified to go down right now... It involves chain resolution (which can generate multiple trusted chains and there's an RFC for that and browsers are dealing with some bad things related to the deprecation of SHA1 and 1024 bit roots), revocation checks (CRL, OCSP), etc. We need to know more about what validity means in the context of letsencrypt before we can determine what to do...
@reaperhulk Yikes, I probably don't want to go down that rabbit hole right away either... I have a few things on my own list after the 3 builders that are already in queue :-)
OK, I'll see if I can add the CSR validity. When my CSR builder PR is merged, I'll add some extra tests for SHA256 signatures too.
Note to self: we also need x509.CSR.extensions (in particular .get_extension_for_oid(x509.OID_SUBJECT_ALTERNATIVE_NAME). Luckily, it's fixed in 37b82df. Thanks, @alex :)
I'm looking for something that's perhaps a bit simpler than doing full chain validation (which I would also like, but this would allow me to completely get rid of M2Crypto): I want to verify the signature of cert_a using the public key in cert_b. With M2 I'm currently doing this:
if cert_a.verify(cert_b.get_pubkey()) == 1:
Would supporting that in Cryptography be easier to do?
Yes, that is definitely a simpler problem (as it only requires validating the signature at one level rather than attempting to resolve a full chain and do all checks).
A bit ugly as we decided we wanted to keep the X509 objects "data only", but easy enough to wrap.
That just leaves "full" x509 certificate validation, which we're tracking with issue #2381, so I'll close this. If I'm mistaken let me know and I can reopen.
Activity
AndreLouisCaron commentedon May 19, 2015
Note that I'm working on most of these ATM.
Some of the work has already landed:
x509.CSR.public_bytes()Some of the work is in open PRs:
x509.CSRBuilder(everything except SAN extension and SHA256 signature)x509.CertificateBuilder(everything except SAN extension and SHA256 signature)x509.Certificate.public_bytes()AndreLouisCaron commentedon May 19, 2015
Out of curiosity, where does this list come from? From Let's Encrypt's website and GitHub repository, it looks like the server-side code is written in Go...
alex commentedon May 19, 2015
It's based on me manually reading through:
github.com/letsencrypt/lets-encrypt-preview
On Mon, May 18, 2015 at 10:00 PM, André Caron [email protected]
wrote:
"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: 125F 5C67 DFE9 4084
AndreLouisCaron commentedon May 20, 2015
Since I'm expecting for it to take a few days before the CSR builder is reviewed and suitably prepared for final submission, I might tackle the few remaining things in this list. In order to accelerate the process, you might be able to give me a bit of insight on how you see this added to the library.
What's missing for SHA256 support? I suspect this might already be supported out of the box. Should I just add some tests and see if it works?
For the CSR and certificate validity checks, would the following interface be correct?
reaperhulk commentedon May 20, 2015
SHA256 will Just Work™ when your PR lands so yeah, that'll be fine. You're welcome to add a test (more tests never bad) though!
The interface for CSR validity looks likely to be good as that's a simple problem.
Certificate validity is a rabbit hole I'm terrified to go down right now... It involves chain resolution (which can generate multiple trusted chains and there's an RFC for that and browsers are dealing with some bad things related to the deprecation of SHA1 and 1024 bit roots), revocation checks (CRL, OCSP), etc. We need to know more about what validity means in the context of letsencrypt before we can determine what to do...
AndreLouisCaron commentedon May 20, 2015
@reaperhulk Yikes, I probably don't want to go down that rabbit hole right away either... I have a few things on my own list after the 3 builders that are already in queue :-)
OK, I'll see if I can add the CSR validity. When my CSR builder PR is merged, I'll add some extra tests for SHA256 signatures too.
kuba commentedon Jul 6, 2015
Note to self: we also need
x509.CSR.extensions(in particular.get_extension_for_oid(x509.OID_SUBJECT_ALTERNATIVE_NAME). Luckily, it's fixed in 37b82df. Thanks, @alex :)alex commentedon Aug 13, 2015
So the remaining open tickets are about signature validation. This is a Hard Problem ™️
dainnilsson commentedon Aug 21, 2015
I'm looking for something that's perhaps a bit simpler than doing full chain validation (which I would also like, but this would allow me to completely get rid of M2Crypto): I want to verify the signature of cert_a using the public key in cert_b. With M2 I'm currently doing this:
if cert_a.verify(cert_b.get_pubkey()) == 1:Would supporting that in Cryptography be easier to do?
reaperhulk commentedon Aug 21, 2015
Yes, that is definitely a simpler problem (as it only requires validating the signature at one level rather than attempting to resolve a full chain and do all checks).
reaperhulk commentedon Jan 1, 2016
@dainnilsson Verification of the type you requested is now possible (in master). It looks like this for an RSA certificate:
A bit ugly as we decided we wanted to keep the X509 objects "data only", but easy enough to wrap.
That just leaves "full" x509 certificate validation, which we're tracking with issue #2381, so I'll close this. If I'm mistaken let me know and I can reopen.