diff --git a/routes/pgp.go b/routes/pgp.go index d82dd31..d94681e 100644 --- a/routes/pgp.go +++ b/routes/pgp.go @@ -1,7 +1,6 @@ package routes import ( - "bytes" "encoding/hex" "net/http" "time" @@ -62,16 +61,6 @@ func GetOpenPGPInformationEncoded(c *gin.Context) { } break } - buf := new(bytes.Buffer) - closer, err := armor.Encode(buf, block.Type, block.Header) - defer closer.Close() - if err != nil { - c.JSON(http.StatusBadRequest, gin.H{ - "status": false, - "message": "Unable to re-encode armor..", - }) - return - } c.JSON(http.StatusOK, gin.H{ "status": true, "fullName": key.FullName, @@ -82,6 +71,6 @@ func GetOpenPGPInformationEncoded(c *gin.Context) { "publicKeyAlgorithm": key.PublicKeyAlgorithm, "fingerprint": hex.EncodeToString(key.Fingerprint[:]), "keyID": key.KeyID, - "armor": buf.String(), + "armor": query, }) }