void test_setup()
{
    int result;
    result = signal_context_create(&global_context, 0);
    ck_assert_int_eq(result, 0);
    signal_context_set_log_function(global_context, test_log);
    setup_test_crypto_provider(global_context);
}
Exemplo n.º 2
0
  void Signal::init(const QString &dataPath) {
    std::random_device rd;
    randomGen.seed(rd());
    signal_context_create(&m_signalContext, nullptr);
    signal_context_set_log_function(m_signalContext, &signal_log);

    Crypto::initCryptoProvider(m_signalContext);
    m_storage.init(m_signalContext, dataPath);

    signal_protocol_identity_get_local_registration_id(m_storage.storeContext(), &m_deviceId);
  }