aboutsummaryrefslogblamecommitdiffstats
path: root/lib/crypto/gpg/gpgbin/import.go
blob: 49e178b51353782f62cf51f8fa427b8194925fb8 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                         
package gpgbin

import (
	"io"
)

// Import runs gpg --import and thus imports both private and public keys
func Import(r io.Reader) error {
	args := []string{"--import"}
	g := newGpg(r, args)
	err := g.cmd.Run()
	if err != nil {
		return err
	}
	return nil
}