diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/convert/convert.go | 2 | ||||
-rw-r--r-- | modules/structs/user_gpgkey.go | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/modules/convert/convert.go b/modules/convert/convert.go index 0b2135c580..9a4714b4e0 100644 --- a/modules/convert/convert.go +++ b/modules/convert/convert.go @@ -191,6 +191,7 @@ func ToGPGKey(key *models.GPGKey) *api.GPGKey { CanEncryptComms: k.CanEncryptComms, CanEncryptStorage: k.CanEncryptStorage, CanCertify: k.CanSign, + Verified: k.Verified, } } emails := make([]*api.GPGKeyEmail, len(key.Emails)) @@ -210,6 +211,7 @@ func ToGPGKey(key *models.GPGKey) *api.GPGKey { CanEncryptComms: key.CanEncryptComms, CanEncryptStorage: key.CanEncryptStorage, CanCertify: key.CanSign, + Verified: key.Verified, } } diff --git a/modules/structs/user_gpgkey.go b/modules/structs/user_gpgkey.go index f501a09cb9..a2ebf7df93 100644 --- a/modules/structs/user_gpgkey.go +++ b/modules/structs/user_gpgkey.go @@ -20,6 +20,7 @@ type GPGKey struct { CanEncryptComms bool `json:"can_encrypt_comms"` CanEncryptStorage bool `json:"can_encrypt_storage"` CanCertify bool `json:"can_certify"` + Verified bool `json:"verified"` // swagger:strfmt date-time Created time.Time `json:"created_at,omitempty"` // swagger:strfmt date-time @@ -40,4 +41,14 @@ type CreateGPGKeyOption struct { // required: true // unique: true ArmoredKey string `json:"armored_public_key" binding:"Required"` + Signature string `json:"armored_signature,omitempty"` +} + +// VerifyGPGKeyOption options verifies user GPG key +type VerifyGPGKeyOption struct { + // An Signature for a GPG key token + // + // required: true + KeyID string `json:"key_id" binding:"Required"` + Signature string `json:"armored_signature" binding:"Required"` } |