-
Notifications
You must be signed in to change notification settings - Fork 41
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
x509 Interface #47
Open
pinheadmz
wants to merge
12
commits into
bcoin-org:master
Choose a base branch
from
pinheadmz:ssl1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
x509 Interface #47
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Finally reached my goal of being able to generate key and ssl cert with bcrypto that can work on a Handshake website with TLSA. Interface is pretty easy, could be more minimal with additional work, and only a few extensions and key types are currently available:
|
pinheadmz
force-pushed
the
ssl1
branch
2 times, most recently
from
June 10, 2020 14:24
36cdf8e
to
0416948
Compare
Also tests x509 encode/decode completely matches the source file.
https://www.ietf.org/rfc/rfc4055.txt "In this case, the rsaEncryption object identifier MUST be used in the algorithm field within the subject public key information, and the parameters field MUST contain NULL."
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is WIP for implementing a user-friendly interface for generating x509 certificates. Ideally bcrypto could be used by a Handshake application to generate an RSA private key, construct and sign an x509 certificate, and export a TLSA record for use with DANE.
So far this branch fixes a few bugs in encoding/decoding x509 and asn1, uses an internal
force
flag to ensure recreation of optional elements, and addsfromJSON
andgetJSON
methods to all types.JSON output looks like this.
The JSON output is still a bit verbose, I'm open to input on what should come next, for example a
fromOptions()
type system to fill in some of the boiler-plate values and simplify some of the embedded objects/arrays. And of coursesign
andverify
methods right on the certificate.