diff options
| author | Werner Koch <[email protected]> | 2005-10-18 17:41:20 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2005-10-18 17:41:20 +0000 |
| commit | c8571979efc165cfe2616add2d44aa876ff1f551 (patch) | |
| tree | b683a50a299ea5d3b76deb81f855737f185fc45b /g10/keygen.c | |
| parent | exported subkeys are now merged into one output keyblock (diff) | |
| download | gnupg-c8571979efc165cfe2616add2d44aa876ff1f551.tar.gz gnupg-c8571979efc165cfe2616add2d44aa876ff1f551.zip | |
Fixed minor card related bugs and enhanced status messages
Diffstat (limited to 'g10/keygen.c')
| -rw-r--r-- | g10/keygen.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/g10/keygen.c b/g10/keygen.c index ae1ac6334..d2348c07c 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -1492,6 +1492,8 @@ parse_expire_string( const char *string ) if( !*string ) seconds = 0; + else if ( !strncmp (string, "seconds=", 8) ) + seconds = atoi (string+8); else if( (abs_date = scan_isodatestr(string)) && abs_date > curtime ) seconds = abs_date - curtime; else if( (mult=check_valid_days(string)) ) @@ -3274,8 +3276,8 @@ gen_card_key (int algo, int keyno, int is_primary, assert (algo == PUBKEY_ALGO_RSA); - - rc = agent_scd_genkey (&info, keyno, 1); + /* Fixme: We don't have the serialnumber available, thus passing NULL. */ + rc = agent_scd_genkey (&info, keyno, 1, NULL); /* if (gpg_err_code (rc) == GPG_ERR_EEXIST) */ /* { */ /* tty_printf ("\n"); */ @@ -3550,7 +3552,9 @@ save_unprotected_key_to_card (PKT_secret_key *sk, int keyno) sprintf (numbuf, "%lu:", (unsigned long)strlen (numbuf2)); p = stpcpy (stpcpy (stpcpy (p, numbuf), numbuf2), "))"); - rc = agent_scd_writekey (keyno, sexp, p - sexp); + /* Fixme: Unfortunately we don't have the serialnumber available - + thus we can't pass it down to the agent. */ + rc = agent_scd_writekey (keyno, NULL, sexp, p - sexp); leave: xfree (sexp); |
