MasterKey is a PGP key used to securely store SOPS' data key by encrypting it and decrypting it.
| 65 | // MasterKey is a PGP key used to securely store SOPS' data key by |
| 66 | // encrypting it and decrypting it. |
| 67 | type MasterKey struct { |
| 68 | // Fingerprint contains the fingerprint of the PGP key used to Encrypt |
| 69 | // or Decrypt the data key with. |
| 70 | Fingerprint string |
| 71 | // EncryptedKey contains the SOPS data key encrypted with PGP. |
| 72 | EncryptedKey string |
| 73 | // CreationDate of the MasterKey, used to determine if the EncryptedKey |
| 74 | // needs rotation. |
| 75 | CreationDate time.Time |
| 76 | |
| 77 | // gnuPGHomeDir contains the absolute path to a GnuPG home directory. |
| 78 | // It can be injected by a (local) keyservice.KeyServiceServer using |
| 79 | // GnuPGHome.ApplyToMasterKey(). |
| 80 | gnuPGHomeDir string |
| 81 | // disableOpenPGP instructs the MasterKey to skip attempting to open any |
| 82 | // pubRing or secRing using OpenPGP. |
| 83 | disableOpenPGP bool |
| 84 | // pubRing contains the absolute path to a public keyring used by OpenPGP. |
| 85 | // When empty, defaultPubRing relative to GnuPG home is assumed. |
| 86 | pubRing string |
| 87 | // secRing contains the absolute path to a sec keyring used by OpenPGP. |
| 88 | // When empty, defaultSecRing relative to GnuPG home is assumed. |
| 89 | secRing string |
| 90 | } |
| 91 | |
| 92 | // NewMasterKeyFromFingerprint takes a PGP fingerprint and returns a new |
| 93 | // MasterKey with that fingerprint. |
nothing calls this directly
no outgoing calls
no test coverage detected