Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rsa openssl mismatch #15

Merged
merged 4 commits into from
Mar 20, 2012
Merged

Conversation

philips
Copy link
Contributor

@philips philips commented Mar 20, 2012

I was trying to compare the output of openssl rsa|dsa in unit tests to the to_pem functions and found a couple of bugs. They were detected when linking luacrypto to certain versions of openssl by the existing unit tests.

Brandon Philips added 4 commits March 14, 2012 10:09
With this patch we can now do things like verify a x509 cert against a x509_ca
then extract its pubkey and test a message signature.

    cert = crypto.x509_cert()
    cert:from_pem(server_cert)
    kpub = cert:pubkey()
    message = 'Hello world'
    verified = crypto.verify('md5', message, signature, kpub)
add docs for the x509_cert and x509_ca objects.
Detect what type of key we are dealing with and use the right to_pem
function. This way we match the enconding that the openssl dsa|rsa apps
use for certificates.
check the return codes of wrote_bio_PrivateKey for any error.
mkottman added a commit that referenced this pull request Mar 20, 2012
@mkottman mkottman merged commit 104d3c8 into mkottman:master Mar 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants