aboutsummaryrefslogtreecommitdiff
path: root/rsa.go
diff options
context:
space:
mode:
authorGibheer <gibheer@gmail.com>2015-02-19 21:48:08 +0100
committerGibheer <gibheer@gmail.com>2015-02-19 21:48:08 +0100
commit80db488cbdbd7a35f61526f8581d806849703298 (patch)
treefdac06b68003bdd94a579cebaf03e8c39e2f8972 /rsa.go
parent639a5379e9abf4a3f0d88464d1a229f8d5df14ae (diff)
add public key loader
This adds a way to restore a public key from any data source.
Diffstat (limited to 'rsa.go')
-rw-r--r--rsa.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/rsa.go b/rsa.go
index 9a4f298..1661163 100644
--- a/rsa.go
+++ b/rsa.go
@@ -56,6 +56,10 @@ func (pr RsaPrivateKey) MarshalPem() (marshalledPemBlock, error) {
return pem.EncodeToMemory(&pem_block), nil
}
+func LoadPublicKeyRsa(raw []byte) (*RsaPublicKey, error) {
+ return nil, errors.New("not implemented yet!")
+}
+
func (pu *RsaPublicKey) MarshalPem() (marshalledPemBlock, error) {
asn1, err := x509.MarshalPKIXPublicKey(pu.public_key)
if err != nil { return nil, err }