mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
scd:nks: Support attributes $ENCRKEYID and $SIGNKEYID.
* scd/app-nks.c (do_getattr): Add new attributes. -- Note that these were already added to 2.2 as part of commit 23784f8bf0ac6d6c52cb2de2f99f46017a92c11a Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
c97c2e578d
commit
671e54d62c
@ -309,8 +309,10 @@ do_getattr (app_t app, ctrl_t ctrl, const char *name)
|
|||||||
int special;
|
int special;
|
||||||
} table[] = {
|
} table[] = {
|
||||||
{ "$AUTHKEYID", 1 },
|
{ "$AUTHKEYID", 1 },
|
||||||
{ "NKS-VERSION", 2 },
|
{ "$ENCRKEYID", 2 },
|
||||||
{ "CHV-STATUS", 3 },
|
{ "$SIGNKEYID", 3 },
|
||||||
|
{ "NKS-VERSION", 4 },
|
||||||
|
{ "CHV-STATUS", 5 },
|
||||||
{ NULL, 0 }
|
{ NULL, 0 }
|
||||||
};
|
};
|
||||||
gpg_error_t err = 0;
|
gpg_error_t err = 0;
|
||||||
@ -340,13 +342,27 @@ do_getattr (app_t app, ctrl_t ctrl, const char *name)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: /* NKS-VERSION */
|
case 2: /* $ENCRKEYID */
|
||||||
|
{
|
||||||
|
char const tmp[] = "NKS-NKS3.45B1";
|
||||||
|
send_status_info (ctrl, table[idx].name, tmp, strlen (tmp), NULL, 0);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3: /* $SIGNKEYID */
|
||||||
|
{
|
||||||
|
char const tmp[] = "NKS-NKS3.4531";
|
||||||
|
send_status_info (ctrl, table[idx].name, tmp, strlen (tmp), NULL, 0);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4: /* NKS-VERSION */
|
||||||
snprintf (buffer, sizeof buffer, "%d", app->app_local->nks_version);
|
snprintf (buffer, sizeof buffer, "%d", app->app_local->nks_version);
|
||||||
send_status_info (ctrl, table[idx].name,
|
send_status_info (ctrl, table[idx].name,
|
||||||
buffer, strlen (buffer), NULL, 0);
|
buffer, strlen (buffer), NULL, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3: /* CHV-STATUS */
|
case 5: /* CHV-STATUS */
|
||||||
{
|
{
|
||||||
/* Returns: PW1.CH PW2.CH PW1.CH.SIG PW2.CH.SIG That are the
|
/* Returns: PW1.CH PW2.CH PW1.CH.SIG PW2.CH.SIG That are the
|
||||||
two global passwords followed by the two SigG passwords.
|
two global passwords followed by the two SigG passwords.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user