Documentation ¶
Index ¶
- Constants
- type CA
- type CompanyCert
- type Depot
- func (db *Depot) CA(pass []byte) ([]*x509.Certificate, *rsa.PrivateKey, error)
- func (db *Depot) CompanyCA(pass []byte, companyID string) ([]*x509.Certificate, *rsa.PrivateKey, error)
- func (db *Depot) CompanyPut(cn string, crt *x509.Certificate, companyID string) error
- func (db *Depot) CreateOrLoadCA(key *rsa.PrivateKey, years int, org, country string) (*x509.Certificate, error)
- func (db *Depot) CreateOrLoadCompanyCA(key *rsa.PrivateKey, years int, org, country string, companyID string) (*x509.Certificate, error)
- func (db *Depot) CreateOrLoadCompanyKey(bits int, companyID string) (*rsa.PrivateKey, error)
- func (db *Depot) CreateOrLoadKey(bits int) (*rsa.PrivateKey, error)
- func (db *Depot) HasCN(cn string, allowTime int, cert *x509.Certificate, revokeOldCertificate bool) (bool, error)
- func (db *Depot) HasCompanyCertCN(cn string, allowTime int, cert *x509.Certificate, revokeOldCertificate bool, ...) (bool, error)
- func (db *Depot) Put(cn string, crt *x509.Certificate) error
- func (db *Depot) Serial() (*big.Int, error)
- type DepotBolt
- func (db *DepotBolt) CA(pass []byte) ([]*x509.Certificate, *rsa.PrivateKey, error)
- func (db *DepotBolt) CreateOrLoadCA(key *rsa.PrivateKey, years int, org, country string) (*x509.Certificate, error)
- func (db *DepotBolt) CreateOrLoadKey(bits int) (*rsa.PrivateKey, error)
- func (db *DepotBolt) HasCN(cn string, allowTime int, cert *x509.Certificate, revokeOldCertificate bool) (bool, error)
- func (db *DepotBolt) Put(cn string, crt *x509.Certificate) error
- func (db *DepotBolt) Serial() (*big.Int, error)
- type KeyValue
Constants ¶
View Source
const (
DefaultDB = "netlive_mdm"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompanyCert ¶
type Depot ¶
type Depot struct { Client *mongo.Client DBName string CollSCEPCertificates *mongo.Collection CollCompanySCEPCertificates *mongo.Collection // contains filtered or unexported fields }
Depot implements a SCEP certifiacte store using boltdb. https://github.com/boltdb/bolt
func NewMongoDepot ¶
NewMongoDepot creates a depot.Depot backed by BoltDB.
func (*Depot) CA ¶
func (db *Depot) CA(pass []byte) ([]*x509.Certificate, *rsa.PrivateKey, error)
func (*Depot) CompanyCA ¶
func (db *Depot) CompanyCA(pass []byte, companyID string) ([]*x509.Certificate, *rsa.PrivateKey, error)
func (*Depot) CompanyPut ¶
func (*Depot) CreateOrLoadCA ¶
func (db *Depot) CreateOrLoadCA(key *rsa.PrivateKey, years int, org, country string) (*x509.Certificate, error)
func (*Depot) CreateOrLoadCompanyCA ¶
func (db *Depot) CreateOrLoadCompanyCA(key *rsa.PrivateKey, years int, org, country string, companyID string) (*x509.Certificate, error)
func (*Depot) CreateOrLoadCompanyKey ¶
func (*Depot) CreateOrLoadKey ¶
func (db *Depot) CreateOrLoadKey(bits int) (*rsa.PrivateKey, error)
func (*Depot) HasCompanyCertCN ¶
type DepotBolt ¶
Depot implements a SCEP certifiacte store using boltdb. https://github.com/boltdb/bolt
func NewBoltDepot ¶
NewBoltDepot creates a depot.Depot backed by BoltDB.
func (*DepotBolt) CA ¶
func (db *DepotBolt) CA(pass []byte) ([]*x509.Certificate, *rsa.PrivateKey, error)
func (*DepotBolt) CreateOrLoadCA ¶
func (db *DepotBolt) CreateOrLoadCA(key *rsa.PrivateKey, years int, org, country string) (*x509.Certificate, error)
func (*DepotBolt) CreateOrLoadKey ¶
func (db *DepotBolt) CreateOrLoadKey(bits int) (*rsa.PrivateKey, error)
Click to show internal directories.
Click to hide internal directories.