From 470d21409b5f26d49fefd34d75b82197045d4811 Mon Sep 17 00:00:00 2001 From: Gibheer Date: Tue, 17 Feb 2015 21:44:10 +0100 Subject: add public key support This adds all options to create and store a public key. --- private_key.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'private_key.go') 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 } -- cgit v1.2.3-70-g09d2