aboutsummaryrefslogtreecommitdiffstats
path: root/g10/call-agent.h
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2018-03-28 09:44:45 +0000
committerNIIBE Yutaka <[email protected]>2018-03-28 09:44:45 +0000
commite610d51f0de11154050915b951bcc5c53c940f5e (patch)
tree27cbc80baf802ac6c09b754f05aa68b0ea6e0f16 /g10/call-agent.h
parentagent,scd: Use pointer to represent HANDLE. (diff)
downloadgnupg-e610d51f0de11154050915b951bcc5c53c940f5e.tar.gz
gnupg-e610d51f0de11154050915b951bcc5c53c940f5e.zip
g10: Change ask_curve so that it can be used outside.
* g10/call-agent.h (struct key_attr): New. * g10/keygen.c (ask_curve): Return const char *. No allocation. (quick_generate_keypair): Follow the change. (generate_keypair, generate_subkeypair): Likewise. (parse_algo_usage_expire): Return const char *. -- This change is intended for using ask_curve from card-util.c. Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'g10/call-agent.h')
-rw-r--r--g10/call-agent.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/g10/call-agent.h b/g10/call-agent.h
index 8de0d13fd..7314ae87b 100644
--- a/g10/call-agent.h
+++ b/g10/call-agent.h
@@ -19,6 +19,13 @@
#ifndef GNUPG_G10_CALL_AGENT_H
#define GNUPG_G10_CALL_AGENT_H
+struct key_attr {
+ int algo; /* Algorithm identifier. */
+ union {
+ unsigned int nbits; /* Supported keysize. */
+ const char *curve; /* Name of curve. */
+ };
+};
struct agent_card_info_s
{
@@ -57,13 +64,7 @@ struct agent_card_info_s
int is_v2; /* True if this is a v2 card. */
int chvmaxlen[3]; /* Maximum allowed length of a CHV. */
int chvretry[3]; /* Allowed retries for the CHV; 0 = blocked. */
- struct { /* Array with key attributes. */
- int algo; /* Algorithm identifier. */
- union {
- unsigned int nbits; /* Supported keysize. */
- const char *curve; /* Name of curve. */
- };
- } key_attr[3];
+ struct key_attr key_attr[3];
struct {
unsigned int ki:1; /* Key import available. */
unsigned int aac:1; /* Algorithm attributes are changeable. */