* engine-gpgsm.c (gpgsm_import): Return an error for unknown data
encodings.
This commit is contained in:
parent
1c454aee81
commit
3bd2d76417
@ -1,3 +1,8 @@
|
|||||||
|
2009-07-07 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* engine-gpgsm.c (gpgsm_import): Return an error for unknown data
|
||||||
|
encodings.
|
||||||
|
|
||||||
2009-06-22 Marcus Brinkmann <marcus@g10code.de>
|
2009-06-22 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
* debug.h: Everywhere, use %p instead of 0x%x to print pointer.
|
* debug.h: Everywhere, use %p instead of 0x%x to print pointer.
|
||||||
|
@ -1544,6 +1544,7 @@ gpgsm_import (void *engine, gpgme_data_t keydata, gpgme_key_t *keyarray)
|
|||||||
{
|
{
|
||||||
engine_gpgsm_t gpgsm = engine;
|
engine_gpgsm_t gpgsm = engine;
|
||||||
gpgme_error_t err;
|
gpgme_error_t err;
|
||||||
|
gpgme_data_encoding_t dataenc;
|
||||||
|
|
||||||
if (!gpgsm)
|
if (!gpgsm)
|
||||||
return gpg_error (GPG_ERR_INV_VALUE);
|
return gpg_error (GPG_ERR_INV_VALUE);
|
||||||
@ -1551,10 +1552,18 @@ gpgsm_import (void *engine, gpgme_data_t keydata, gpgme_key_t *keyarray)
|
|||||||
if (keydata && keyarray)
|
if (keydata && keyarray)
|
||||||
gpg_error (GPG_ERR_INV_VALUE); /* Only one is allowed. */
|
gpg_error (GPG_ERR_INV_VALUE); /* Only one is allowed. */
|
||||||
|
|
||||||
|
dataenc = gpgme_data_get_encoding (keydata);
|
||||||
|
|
||||||
if (keyarray)
|
if (keyarray)
|
||||||
{
|
{
|
||||||
return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
|
return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
|
||||||
}
|
}
|
||||||
|
else if (dataenc == GPGME_DATA_ENCODING_URL
|
||||||
|
|| dataenc == GPGME_DATA_ENCODING_URL0
|
||||||
|
|| dataenc == GPGME_DATA_ENCODING_URLESC)
|
||||||
|
{
|
||||||
|
return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gpgsm->input_cb.data = keydata;
|
gpgsm->input_cb.data = keydata;
|
||||||
|
Loading…
Reference in New Issue
Block a user