408 |
|
|
409 |
/* Set the callback to @cb and the hook value to @cb_value. */ |
/* Set the callback to @cb and the hook value to @cb_value. */ |
410 |
void |
void |
411 |
GpgCardEdit::setCallback (const char* (*cb)(int code, void *opaque), |
GpgCardEdit::setCallback (const char* (*_cb)(int code, void *opaque), |
412 |
void *cb_value) |
void *_cb_value) |
413 |
{ |
{ |
414 |
this->cb_value = cb_value; |
this->cb_value = _cb_value; |
415 |
this->card_cb = cb; |
this->card_cb = _cb; |
416 |
} |
} |
417 |
|
|
418 |
|
|
501 |
free (this->keygen.expdate); |
free (this->keygen.expdate); |
502 |
this->keygen.expdate = (char*)calloc (1, 16); |
this->keygen.expdate = (char*)calloc (1, 16); |
503 |
if (this->keygen.expdate) |
if (this->keygen.expdate) |
504 |
sprintf (this->keygen.expdate, "%d", valid); |
sprintf (this->keygen.expdate, "%lu", valid); |
505 |
|
|
506 |
if (!this->keygen.name || !this->keygen.email) |
if (!this->keygen.name || !this->keygen.email) |
507 |
return gpg_error (GPG_ERR_ENOMEM); |
return gpg_error (GPG_ERR_ENOMEM); |