aboutsummaryrefslogtreecommitdiff
path: root/private_key.go
diff options
context:
space:
mode:
authorGibheer <gibheer@gmail.com>2015-02-17 21:44:10 +0100
committerGibheer <gibheer@gmail.com>2015-02-17 21:44:10 +0100
commit470d21409b5f26d49fefd34d75b82197045d4811 (patch)
treef808e14913b6f73406e93c6250ae7826d8f2777c /private_key.go
parentb022e8ab4ce93bc429e5052dd806ae03a068a676 (diff)
add public key support
This adds all options to create and store a public key.
Diffstat (limited to 'private_key.go')
-rw-r--r--private_key.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/private_key.go b/private_key.go
index 6b1b859..3e6aee3 100644
--- a/private_key.go
+++ b/private_key.go
@@ -16,16 +16,16 @@ var (
// Read the private key from the path and try to figure out which type of key it
// might be.
-func ReadPrivateKeyFile(path string) (pkilib.PrivateKey, error) {
+func ReadPrivateKeyFile(path string) (pki.PrivateKey, error) {
raw_pk, err := readSectionFromFile(path, TypeLabelECDSA)
if err == nil {
- pk, err := pkilib.LoadPrivateKeyEcdsa(raw_pk)
+ pk, err := pki.LoadPrivateKeyEcdsa(raw_pk)
if err != nil { return nil, err }
return pk, nil
}
raw_pk, err = readSectionFromFile(path, TypeLabelRSA)
if err == nil {
- pk, err := pkilib.LoadPrivateKeyRsa(raw_pk)
+ pk, err := pki.LoadPrivateKeyRsa(raw_pk)
if err != nil { return nil, err }
return pk, nil
}