aboutsummaryrefslogtreecommitdiffstats
path: root/g10/misc.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2014-07-23 13:12:43 +0000
committerWerner Koch <[email protected]>2014-07-23 13:12:43 +0000
commitea186540db5b418bc6f6e5ca90337672c9981c88 (patch)
tree9ad7ba700ed2261c1443e273907598ed41b0ada7 /g10/misc.c
parentcommon: Add cpr_get_answer_is_yes_def() (diff)
downloadgnupg-ea186540db5b418bc6f6e5ca90337672c9981c88.tar.gz
gnupg-ea186540db5b418bc6f6e5ca90337672c9981c88.zip
gpg: Add command --quick-gen-key
* g10/gpg.c (aQuickKeygen): New. * g10/misc.c (is_valid_user_id): New stub. * g10/keygen.c (quickgen_set_para): New. (quick_generate_keypair): New. -- Note that the validation of the specified user id has not yet been implemented.
Diffstat (limited to 'g10/misc.c')
-rw-r--r--g10/misc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/g10/misc.c b/g10/misc.c
index e219d7623..0125da4b0 100644
--- a/g10/misc.c
+++ b/g10/misc.c
@@ -1499,6 +1499,20 @@ is_valid_mailbox (const char *name)
}
+/* Check whether UID is a valid standard user id of the form
+ "Heinrich Heine <[email protected]>"
+ and return true if this is the case. */
+int
+is_valid_user_id (const char *uid)
+{
+ if (!uid || !*uid)
+ return 0;
+
+ return 1;
+}
+
+
+
/* Similar to access(2), but uses PATH to find the file. */
int
path_access(const char *file,int mode)