merged
authorKrista Bennett <krista@pep-project.org>
Fri, 19 Jan 2018 16:37:06 +0100
changeset 2426435c19d76cad
parent 2425 0cdb4ce00787
parent 2424 5fb4f5f2a5c2
child 2428 52bd368c51aa
merged
     1.1 --- a/src/pEpEngine.h	Fri Jan 19 16:36:27 2018 +0100
     1.2 +++ b/src/pEpEngine.h	Fri Jan 19 16:37:06 2018 +0100
     1.3 @@ -37,6 +37,8 @@
     1.4      PEP_INIT_GPGME_INIT_FAILED                      = 0x0111,
     1.5      PEP_INIT_NO_GPG_HOME                            = 0x0112,
     1.6      PEP_INIT_NETPGP_INIT_FAILED                     = 0x0113,
     1.7 +    PEP_CANNOT_DETERMINE_GPG_VERSION                = 0x0114,
     1.8 +    PEP_UNSUPPORTED_GPG_VERSION                     = 0x0115,
     1.9  
    1.10      PEP_INIT_SQLITE3_WITHOUT_MUTEX                  = 0x0120,
    1.11      PEP_INIT_CANNOT_OPEN_DB                         = 0x0121,
     2.1 --- a/src/pgp_gpg.c	Fri Jan 19 16:36:27 2018 +0100
     2.2 +++ b/src/pgp_gpg.c	Fri Jan 19 16:37:06 2018 +0100
     2.3 @@ -473,6 +473,15 @@
     2.4  
     2.5      gpg.gpgme_set_armor(session->ctx, 1);
     2.6  
     2.7 +    gpgme_engine_info_t info;
     2.8 +    int err = gpg.gpgme_get_engine_info(&info);
     2.9 +    assert(err == GPG_ERR_NO_ERROR);
    2.10 +    if (err != GPG_ERR_NO_ERROR)
    2.11 +        return PEP_OUT_OF_MEMORY;
    2.12 +
    2.13 +    if (!info->version)
    2.14 +        return PEP_CANNOT_DETERMINE_GPG_VERSION;
    2.15 +
    2.16      return PEP_STATUS_OK;
    2.17  
    2.18  pep_error: