Documentation ¶
Overview ¶
Package authorize contains logic for signing and verifying a given timestamp and for signing & verifying certificate request info. This package is designed for usage with the authorizer to prevent DDoS attacks
Index ¶
- func Sign(rand io.Reader, now time.Time, privKey *rsa.PrivateKey) ([]byte, error)
- func SignCertRequest(rng io.Reader, gwRsa *rsa.PrivateKey, acmeToken string, now time.Time) ([]byte, error)
- func Verify(now time.Time, signedTS time.Time, pubKey *rsa.PublicKey, nid *id.ID, ...) error
- func VerifyCertRequest(gwPub *rsa.PublicKey, sig []byte, acmeToken string, now, signedTS time.Time, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SignCertRequest ¶
func SignCertRequest(rng io.Reader, gwRsa *rsa.PrivateKey, acmeToken string, now time.Time) ([]byte, error)
SignCertRequest signs the ACME token & other info sent with an AuthorizerCertRequest
func Verify ¶
func Verify(now time.Time, signedTS time.Time, pubKey *rsa.PublicKey, nid *id.ID, salt []byte, delta time.Duration, signature []byte) error
Verify confirms the node's signed timestamp. It performs a series of checks prior to doing so: First it will determine that signedTS is within +/- delta of now. Second it will check that the public key and salt make the passed in node ID Finally it will verify the signature on the signedTS using the public key
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.