aboutsummaryrefslogtreecommitdiff
path: root/x509.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-10-28 14:56:38 +0100
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-10-28 14:56:38 +0100
commitffe6e49220648a0b847e47e1072cf0b8d1b1f803 (patch)
tree52949a55f3d8b1ad1f214aa6e408c194ecf1eaba /x509.go
parentcaca215c9516e8dc236a8510a6a5467c267d2331 (diff)
go fmt
Diffstat (limited to 'x509.go')
-rw-r--r--x509.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/x509.go b/x509.go
index 841b477..04b3534 100644
--- a/x509.go
+++ b/x509.go
@@ -4,9 +4,9 @@ import (
"fmt"
"crypto"
- "crypto/rand"
- "crypto/ed25519"
"crypto/ecdsa"
+ "crypto/ed25519"
+ "crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/pem"
@@ -49,7 +49,6 @@ func LoadTrustAnchors(path string) ([]*x509.Certificate, *x509.CertPool, error)
return anchors, pool, nil
}
-
func LoadEd25519SigningKey(path string) (ed25519.PrivateKey, error) {
data, err := ioutil.ReadFile(path)
if err != nil {
@@ -114,7 +113,6 @@ func VerifySignature(leaf, signature []byte, certificate *x509.Certificate) erro
return nil
}
-
func GenV1SDI(ld *LogParameters, leaf []byte) (StItem, error) {
// Note that ed25519 does not use the passed io.Reader
sig, err := ld.Signer.Sign(rand.Reader, leaf, crypto.Hash(0))