PublicKeysFrom returns a map of all public keys encoded in PEM format keyed by the name of the key
(ctx context.Context)
| 107 | // PublicKeysFrom returns a map of all public keys encoded in PEM format |
| 108 | // keyed by the name of the key |
| 109 | func PublicKeysFrom(ctx context.Context) map[string]string { |
| 110 | keys := allKeysFrom(ctx) |
| 111 | |
| 112 | ret := make(map[string]string, len(keys)) |
| 113 | for name, key := range keys { |
| 114 | ret[name] = string(key.PublicBytes) |
| 115 | } |
| 116 | |
| 117 | return ret |
| 118 | } |
| 119 | |
| 120 | // PrivateKeysFrom returns a map of all private keys encoded in PEM format |
| 121 | // keyed by the name of the key |
no test coverage detected