-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Set public key from private key in DNSKEY instead of copying it from DNSKEY to private key #1560
base: master
Are you sure you want to change the base?
Conversation
4c2c49c
to
afda3af
Compare
afda3af
to
b680beb
Compare
…DNSKEY to private key Previously when loading a PrivateKey into a DNSKEY we would return the PrivateKey with the PublicKey set from the DNSKEY struct. Now that behaviour is flipped and the PublicKey is taken from the PrivateKey and set in the DNSKEY. It will now fail if the algorithm or PublicKey in the DNSKEY doesn't match what is loaded in the input file
b680beb
to
d9e2afe
Compare
@@ -48,27 +48,29 @@ const ( | |||
|
|||
// Errors defined in this package. | |||
var ( | |||
ErrAlg error = &Error{err: "bad algorithm"} // ErrAlg indicates an error with the (DNSSEC) algorithm. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happened with this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a new entry and my editor reformatted the code to align better. I thought it an ok change so I kept it, but I can take this out if needed.
what motivates this change? |
I have private keys stored in a database and I need to load those, get the public key from it and also use that to create the DS. The previous version took the public key from the DNSKEY object and then copied it into the private key. To me it makes more sense to just keep the public key stored inside the private key (and it also serves my needs to be fair). |
Hi, would you consider merging this? It is an implementation of #1558 |
Previously when loading a PrivateKey into a DNSKEY we would return the PrivateKey with the PublicKey set from the DNSKEY struct. Now that behaviour is flipped and the PublicKey is taken from the PrivateKey and set in the DNSKEY.