err = gpg_error (GPG_ERR_INV_SEXP);
goto out;
}
+ if (*p_elems == 'q' && datalen)
+ { /* Remove the prefix 0x40. */
+ data++;
+ datalen--;
+ }
err = stream_write_string (stream, data, datalen);
if (err)
goto out;
goto out;
}
- pi = gcry_calloc_secure (2, sizeof (*pi) + 100 + 1);
+ pi = gcry_calloc_secure (2, sizeof (*pi) + MAX_PASSPHRASE_LEN + 1);
if (!pi)
{
err = gpg_error_from_syserror ();
goto out;
}
- pi2 = pi + (sizeof *pi + 100 + 1);
- pi->max_length = 100;
+ pi2 = pi + (sizeof *pi + MAX_PASSPHRASE_LEN + 1);
+ pi->max_length = MAX_PASSPHRASE_LEN + 1;
pi->max_tries = 1;
pi->with_repeat = 1;
- pi2->max_length = 100;
+ pi2->max_length = MAX_PASSPHRASE_LEN + 1;
pi2->max_tries = 1;
pi2->check_cb = reenter_compare_cb;
pi2->check_cb_arg = pi->pin;