[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/openpgp 75cc1e133f 07/30: Added and renamed opengpg-upl
From: |
ELPA Syncer |
Subject: |
[elpa] externals/openpgp 75cc1e133f 07/30: Added and renamed opengpg-upload-key |
Date: |
Sun, 26 Mar 2023 10:59:26 -0400 (EDT) |
branch: externals/openpgp
commit 75cc1e133ff1e27bc2e97991e80f4cf45b07f25e
Author: Philip Kaludercic <philip.kaludercic@fau.de>
Commit: Philip Kaludercic <philip.kaludercic@fau.de>
Added and renamed opengpg-upload-key
---
openpgp.el | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/openpgp.el b/openpgp.el
index 4490240923..b730c499e1 100644
--- a/openpgp.el
+++ b/openpgp.el
@@ -1,4 +1,4 @@
-;;; $Id: openpgp.el,v 1.5 2020/03/04 15:42:07 oj14ozun Exp oj14ozun $
+;;; $Id: openpgp.el,v 1.6 2020/03/04 18:01:30 oj14ozun Exp oj14ozun $
;;; Implementation of the keys.openpgp.org protocol as specified by
;;; https://keys.openpgp.org/about/api
@@ -84,7 +84,7 @@ TOKEN should be supplied by a previous \"upload-key\"
request."
(error "Error in response: %s" (cdr (assq 'error data))))
(openpgp-request-verify email (cdr (assq 'token data)))))
-(defun openpgp-upload-key (email key)
+(defun openpgp-upload-key-string (email key)
"Upload KEY for address EMAIL to keyserver.
The KEY should be a string, containing a ASCII armoured public
@@ -98,11 +98,21 @@ key."
(defun openpgp-upload-key-file (email key-file)
"Upload key from KEY-FILE for address EMAIL."
- (interactive (list (read-string "Email: ")
+ (interactive (list (read-string "Email: " nil nil user-mail-address)
(read-file-name "Key file: ")))
(with-temp-buffer
(insert-file-contents key-file)
- (openpgp-upload-key email (buffer-string))))
+ (openpgp-upload-key-string email (buffer-string))))
+
+(defun openpgp-upload-key (email)
+ "Upload public key for address EMAIL using gpg."
+ (interactive (list (read-string (format "Email (default: %s): "
+ user-mail-address)
+ nil nil user-mail-address)))
+ (let* ((addr (shell-quote-argument email))
+ (cmd (format "gpg --armor --export %s" addr))
+ (out (shell-command-to-string cmd)))
+ (openpgp-upload-key-string email out)))
;; MAIL CLIENT SUPPORT
- [elpa] branch externals/openpgp created (now 25babb1060), ELPA Syncer, 2023/03/26
- [elpa] externals/openpgp 4d5a2f1444 02/30: Added missing :object-type for json-parse-buffer, ELPA Syncer, 2023/03/26
- [elpa] externals/openpgp 75cc1e133f 07/30: Added and renamed opengpg-upload-key,
ELPA Syncer <=
- [elpa] externals/openpgp 81cb6075a9 19/30: Add missing type to 'openpgp-keyserver' user option, ELPA Syncer, 2023/03/26
- [elpa] externals/openpgp fa836bc85c 09/30: Added comment to note Emacs 27 requirement, ELPA Syncer, 2023/03/26
- [elpa] externals/openpgp 322b045d4e 24/30: Assign copyright to the FSF, ELPA Syncer, 2023/03/26
- [elpa] externals/openpgp 665fd5e05d 26/30: Add a .dir-locals.el file, ELPA Syncer, 2023/03/26
- [elpa] externals/openpgp 9b17ce593f 13/30: Added email autocompletion for openpgp-upload-key-file, ELPA Syncer, 2023/03/26
- [elpa] externals/openpgp 9385b7502e 17/30: Format file as a proper Emacs package, ELPA Syncer, 2023/03/26
- [elpa] externals/openpgp 226b50eba8 11/30: Added missing require statments, ELPA Syncer, 2023/03/26
- [elpa] externals/openpgp 63b794e5f6 06/30: Fixed mu4e issues, ELPA Syncer, 2023/03/26
- [elpa] externals/openpgp a31d7bbb79 16/30: Fixed scoping in openpgp-mu4e-fetch-key, ELPA Syncer, 2023/03/26
- [elpa] externals/openpgp 7dbc5feede 22/30: Complete missing information in header, ELPA Syncer, 2023/03/26