src/pEpEngine.c
branchENGINE-524
changeset 3735 25b31318dcdc
parent 3638 4ba9bd8b80c1
parent 3720 9ed76a79d784
child 3740 248166aa4ab2
     1.1 --- a/src/pEpEngine.c	Thu May 16 14:15:12 2019 +0200
     1.2 +++ b/src/pEpEngine.c	Mon May 20 12:26:41 2019 +0200
     1.3 @@ -1991,19 +1991,22 @@
     1.4  DYNAMIC_API void config_passive_mode(PEP_SESSION session, bool enable)
     1.5  {
     1.6      assert(session);
     1.7 -    session->passive_mode = enable;
     1.8 +    if (session)
     1.9 +        session->passive_mode = enable;
    1.10  }
    1.11  
    1.12  DYNAMIC_API void config_unencrypted_subject(PEP_SESSION session, bool enable)
    1.13  {
    1.14      assert(session);
    1.15 -    session->unencrypted_subject = enable;
    1.16 +    if (session)
    1.17 +        session->unencrypted_subject = enable;
    1.18  }
    1.19  
    1.20  DYNAMIC_API void config_service_log(PEP_SESSION session, bool enable)
    1.21  {
    1.22      assert(session);
    1.23 -    session->service_log = enable;
    1.24 +    if (session)
    1.25 +        session->service_log = enable;
    1.26  }
    1.27  
    1.28  DYNAMIC_API PEP_STATUS log_event(
    1.29 @@ -4405,6 +4408,16 @@
    1.30              revoked);
    1.31  }
    1.32  
    1.33 +DYNAMIC_API PEP_STATUS config_cipher_suite(PEP_SESSION session,
    1.34 +        PEP_CIPHER_SUITE suite)
    1.35 +{
    1.36 +    assert(session);
    1.37 +    if (!session)
    1.38 +        return PEP_ILLEGAL_VALUE;
    1.39 +
    1.40 +    return session->cryptotech[PEP_crypt_OpenPGP].config_cipher_suite(session, suite);
    1.41 +}
    1.42 +
    1.43  static void _clean_log_value(char *text)
    1.44  {
    1.45      if (text) {
    1.46 @@ -4990,6 +5003,9 @@
    1.47      return PEP_ENGINE_VERSION;
    1.48  }
    1.49  
    1.50 +DYNAMIC_API const char* get_protocol_version() {
    1.51 +    return PEP_VERSION;
    1.52 +}
    1.53  
    1.54  DYNAMIC_API PEP_STATUS reset_pEptest_hack(PEP_SESSION session)
    1.55  {