()
| 132 | } |
| 133 | |
| 134 | func (c *initCmd) getPublicKeyArmored() ([]byte, error) { |
| 135 | entity, err := jsonsign.EntityFromSecring(c.keyId, c.secretRing) |
| 136 | if err != nil { |
| 137 | return nil, fmt.Errorf("Could not find keyId %v in ring %v: %v", c.keyId, c.secretRing, err) |
| 138 | } |
| 139 | pubArmor, err := jsonsign.ArmoredPublicKey(entity) |
| 140 | if err != nil { |
| 141 | return nil, fmt.Errorf("failed to export armored public key ID %q from %v: %v", c.keyId, c.secretRing, err) |
| 142 | } |
| 143 | return []byte(pubArmor), nil |
| 144 | } |
| 145 | |
| 146 | func (c *initCmd) clientConfigFromServer() (*clientconfig.Config, error) { |
| 147 | if c.noconfig { |
no test coverage detected