diff options
-rwxr-xr-x | src/subcommands/ma/add-certifier | 4 | ||||
-rwxr-xr-x | src/subcommands/ma/diagnostics | 7 | ||||
-rwxr-xr-x | src/subcommands/ma/list-certifiers | 4 | ||||
-rwxr-xr-x | src/subcommands/ma/remove-certifier | 3 | ||||
-rwxr-xr-x | src/subcommands/ma/update-users | 6 | ||||
-rwxr-xr-x | src/subcommands/mh/add-hostname | 3 | ||||
-rwxr-xr-x | src/subcommands/mh/gen-key | 4 | ||||
-rwxr-xr-x | src/subcommands/mh/import-key | 4 | ||||
-rwxr-xr-x | src/subcommands/mh/revoke-hostname | 3 |
9 files changed, 30 insertions, 8 deletions
diff --git a/src/subcommands/ma/add-certifier b/src/subcommands/ma/add-certifier index 3bd800c..451506d 100755 --- a/src/subcommands/ma/add-certifier +++ b/src/subcommands/ma/add-certifier @@ -13,6 +13,8 @@ # retrieve key from web of trust, import it into the host keyring, and # ltsign the key in the host keyring so that it may certify other keys +add_certifier() { + local domain local trust local depth @@ -139,3 +141,5 @@ if echo "$ltsignCommand" | \ else failure "Problem adding identify certifier." fi + +} diff --git a/src/subcommands/ma/diagnostics b/src/subcommands/ma/diagnostics index b6003b0..66aa6b4 100755 --- a/src/subcommands/ma/diagnostics +++ b/src/subcommands/ma/diagnostics @@ -10,7 +10,10 @@ # They are Copyright 2008, and are all released under the GPL, version 3 # or later. -# * check on the status and validity of the key and public certificates +# check on the status and validity of the key and public certificates + +diagnostics() { + local seckey local keysfound local curdate @@ -177,3 +180,5 @@ if [ "$problemsfound" -gt 0 ]; then else echo "Everything seems to be in order!" fi + +} diff --git a/src/subcommands/ma/list-certifiers b/src/subcommands/ma/list-certifiers index 789d553..e920888 100755 --- a/src/subcommands/ma/list-certifiers +++ b/src/subcommands/ma/list-certifiers @@ -12,6 +12,8 @@ # list the host certifiers +list_certifiers() { + local keys local key @@ -23,3 +25,5 @@ keys=$(gpg_authentication "--no-options --list-options show-uid-validity --keyri for key in $keys ; do gpg_authentication "--no-options --list-options show-uid-validity --keyring ${GNUPGHOME_AUTHENTICATION}/pubring.gpg --list-key --fingerprint $key" done + +} diff --git a/src/subcommands/ma/remove-certifier b/src/subcommands/ma/remove-certifier index a4eaf54..117bad4 100755 --- a/src/subcommands/ma/remove-certifier +++ b/src/subcommands/ma/remove-certifier @@ -12,6 +12,8 @@ # delete a certifiers key from the host keyring +remove_certifier() { + local keyID local fingerprint @@ -43,3 +45,4 @@ else failure "Problem removing identity certifier." fi +} diff --git a/src/subcommands/ma/update-users b/src/subcommands/ma/update-users index a26d3fb..0861364 100755 --- a/src/subcommands/ma/update-users +++ b/src/subcommands/ma/update-users @@ -10,6 +10,8 @@ # They are Copyright 2008, and are all released under the GPL, version 3 # or later. +update_users() { + if [ "$1" ] ; then # get users from command line unames="$@" @@ -141,4 +143,6 @@ for uname in $unames ; do # destroy temporary directory rm -rf "$TMPLOC" - done +done + +} diff --git a/src/subcommands/mh/add-hostname b/src/subcommands/mh/add-hostname index 7726a29..591f52e 100755 --- a/src/subcommands/mh/add-hostname +++ b/src/subcommands/mh/add-hostname @@ -60,9 +60,6 @@ EOF if echo "$adduidCommand" | \ gpg_host --quiet --command-fd 0 --edit-key "0x${fingerprint}!" ; then - # update the trustdb for the authentication keyring - gpg_authentication "--check-trustdb" - show_key echo diff --git a/src/subcommands/mh/gen-key b/src/subcommands/mh/gen-key index 8558441..72b9138 100755 --- a/src/subcommands/mh/gen-key +++ b/src/subcommands/mh/gen-key @@ -10,6 +10,8 @@ # They are Copyright 2008, and are all released under the GPL, version 3 # or later. +gen_key() { + local keyType="RSA" local keyLength="2048" local keyUsage="auth" @@ -100,3 +102,5 @@ log info "SSH host public key in OpenPGP form: ${SYSDATADIR}/ssh_host_rsa_key.pu # show info about new key show_key + +} diff --git a/src/subcommands/mh/import-key b/src/subcommands/mh/import-key index ac67711..9ba51d2 100755 --- a/src/subcommands/mh/import-key +++ b/src/subcommands/mh/import-key @@ -10,6 +10,8 @@ # They are Copyright 2008, and are all released under the GPL, version 3 # or later. +import_key() { + local hostName=$(hostname -f) local keyFile="/etc/ssh/ssh_host_rsa_key" local keyExpire @@ -82,3 +84,5 @@ log info "SSH host public key in OpenPGP form: ${SYSDATADIR}/ssh_host_rsa_key.pu # show info about new key show_key + +} diff --git a/src/subcommands/mh/revoke-hostname b/src/subcommands/mh/revoke-hostname index 0a773a3..01f6ee0 100755 --- a/src/subcommands/mh/revoke-hostname +++ b/src/subcommands/mh/revoke-hostname @@ -78,9 +78,6 @@ EOF if echo "$revuidCommand" | \ gpg_host --quiet --command-fd 0 --edit-key "0x${fingerprint}!" ; then - # update the trustdb for the authentication keyring - gpg_authentication "--check-trustdb" - show_key echo |