Check GPG key on startup
This commit is contained in:
parent
cd6b508436
commit
9f39a49c4c
6
main.go
6
main.go
@ -5,6 +5,7 @@ import (
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
"flag"
|
||||
"log"
|
||||
@ -169,8 +170,11 @@ func main() {
|
||||
log.Fatalf("Error: %v", err)
|
||||
}
|
||||
|
||||
log.Printf("Encrypting files to %v", strings.ToUpper(gpgkey.GetFingerprint()))
|
||||
|
||||
|
||||
if !gpgkey.CanEncrypt(time.Now().Unix()) {
|
||||
log.Fatalf("Error: Provided GPG key does not support encryption")
|
||||
}
|
||||
|
||||
factory := &ForwarderDriverFactory{
|
||||
RecipientKey: gpgkey,
|
||||
|
Loading…
Reference in New Issue
Block a user