Print them at level 4. Push printing of locked portions to level 5.
.RB ` \-v '
options show more information, such as the exact time of day for expiry
and deletion, key attributes, and a dump of the actual key data. If the
.RB ` \-v '
options show more information, such as the exact time of day for expiry
and deletion, key attributes, and a dump of the actual key data. If the
-verbosity level is sufficiently high, passphrases are requested to
-decrypt locked keys. Make sure nobody is looking over your shoulder
-when you do this!
+verbosity level is sufficiently high, secret parts of keys are printed,
+and passphrases are requested to decrypt locked keys. Make sure nobody
+is looking over your shoulder when you do this!
.SS "fingerprint"
Reports a fingerprint (secure hash) on components of requested keys.
The following options are supported:
.SS "fingerprint"
Reports a fingerprint (secure hash) on components of requested keys.
The following options are supported:
+ if ((k->e&KF_ENCMASK) == KENC_ENCRYPT && o->v <= 4)
+ { fputs(" encrypted\n", stdout); return; }
+ if ((k->e&KF_ENCMASK) != KENC_STRUCT && !(k->e&KF_NONSECRET) && o->v <= 3)
+ { fputs(" secret\n", stdout); return; }
+
switch (k->e & KF_ENCMASK) {
/* --- Binary key data --- *
switch (k->e & KF_ENCMASK) {
/* --- Binary key data --- *
* key. Otherwise just say that it's encrypted and move on.
*/
* key. Otherwise just say that it's encrypted and move on.
*/
- case KENC_ENCRYPT:
- if (o->v <= 3)
- fputs(" encrypted\n", stdout);
+ case KENC_ENCRYPT: {
+ key_data *kd;
+ if (key_punlock(&kd, k, d->buf))
+ printf(" <failed to unlock %s>\n", d->buf);
- key_data *kd;
- if (key_punlock(&kd, k, d->buf))
- printf(" <failed to unlock %s>\n", d->buf);
- else {
- fputs(" encrypted", stdout);
- showkeydata(kd, ind, o, d);
- key_drop(kd);
- }
+ fputs(" encrypted", stdout);
+ showkeydata(kd, ind, o, d);
+ key_drop(kd);
/* --- Integer keys --- *
*
/* --- Integer keys --- *
*