rm certDB helper and build in

This commit is contained in:
6543 2021-12-05 19:00:57 +01:00
parent a0534f1fde
commit 5fe51d8621
No known key found for this signature in database
GPG key ID: C99B82E40B027BAE
5 changed files with 53 additions and 59 deletions

View file

@ -74,7 +74,9 @@ func mockCert(domain, msg, mainDomainSuffix string, keyDatabase database.CertDB)
if domain == "*"+mainDomainSuffix || domain == mainDomainSuffix[1:] {
databaseName = mainDomainSuffix
}
database.PogrebPut(keyDatabase, []byte(databaseName), res)
if err := keyDatabase.Put(databaseName, res); err != nil {
panic(err)
}
tlsCertificate, err := tls.X509KeyPair(res.Certificate, res.PrivateKey)
if err != nil {