|
|
@@ -50,14 +50,19 @@ type AuthDB interface {
|
|
|
Revoke(rci *RevokedCertificateInfo) error
|
|
|
RevokeSSH(rci *RevokedCertificateInfo) error
|
|
|
GetCertificate(serialNumber string) (*x509.Certificate, error)
|
|
|
- StoreCertificate(crt *x509.Certificate) error
|
|
|
UseToken(id, tok string) (bool, error)
|
|
|
IsSSHHost(name string) (bool, error)
|
|
|
- StoreSSHCertificate(crt *ssh.Certificate) error
|
|
|
GetSSHHostPrincipals() ([]string, error)
|
|
|
Shutdown() error
|
|
|
}
|
|
|
|
|
|
+// CertificateStorer is an extension of AuthDB that allows to store
|
|
|
+// certificates.
|
|
|
+type CertificateStorer interface {
|
|
|
+ StoreCertificate(crt *x509.Certificate) error
|
|
|
+ StoreSSHCertificate(crt *ssh.Certificate) error
|
|
|
+}
|
|
|
+
|
|
|
// DB is a wrapper over the nosql.DB interface.
|
|
|
type DB struct {
|
|
|
nosql.DB
|