RSA import x509 #79
No reviewers
Labels
No labels
bug
duplicate
enhancement
feature
help wanted
improve API
invalid
needs documentation
not-planned
rtfm
stale
support
wishlist
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-libtom/libtomcrypt!79
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/rsa_import_x509"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Yeah I know it's nothing like a general purpose x.509 parser, but at least it can import the public key from an RSA certificate.
Any suggestions/comments/ideas?
I am definitely for adding this functionality.
I am only not sure whether to put it inside
rsa_import(..)or whether to handle it in a separatersa_import_x509(..)X.509 cert is not the only format of RSA key we do not support - for example I have partly working import of PKCS8 private keys here: https://github.com/DCIT/perl-CryptX/blob/master/src/ltc/pk/rsa/rsa_import_pkcs8.c - implemented as a separate
rsa_import_pkcs8(..)how about factoring-out several specific methods and keeping rsa_import() as a one-shot that tries to determine the correct type?
looks good
Would you mind creating a PR with the
rsa_import_pkcs8(..)implementation?Then I'd factor out the other specific functions to a new PR and this one will then only be for the x509.
While working on a test for #157 I have created also a test case for future
rsa_import_x509. Here is the relevant fragment that should be added intorsa_test.c:I guess it should be enough to replace the
rsa_importcall in the added test byrsa_import_x509no?Well, of course my post assumes that X.509 import will be implemented in a separate
rsa_import_x509which is just my wish. Currently this PR is implementing X.509 import insidersa_import. Simply you have to call whatever function will be capable of handling X.509.The data in
x509_public_rsais DER encoded X.509 certificate that contains RSA public key corresponding to already usedopenssl_private_rsafromrsa_test.c.Uhm, your testcase doesn't work... :(
that's the decoding of your cert which isn't a valid x509 cert, right?
It was generated by openssl, so it should be valid.
And ASN.1 structure
Okay, is this one ready to merge? I'll open another PR with the changes for your testcase
Coverage increased (+0.08%) to 87.556% when pulling
ac7915ed13on feature/rsa_import_x509 into0a400f465fon develop.👍 from me
But keep in mind that I have my "failing" demo certificate which I would like to be loadable 😃