ENGINE-128: #comment Both MIME_encrypt and MIME_decrypt work and will be merged into default this evening once I fix the args in the documentation. ENGINE-128
authorKrista Grothoff <krista@pep-project.org>
Mon, 24 Oct 2016 14:58:18 +0200
branchENGINE-128
changeset 1328b8163caba309
parent 1327 0b48955f6d74
child 1331 fe7e15cae527
ENGINE-128: #comment Both MIME_encrypt and MIME_decrypt work and will be merged into default this evening once I fix the args in the documentation.
test/message_api_test.cc
     1.1 --- a/test/message_api_test.cc	Mon Oct 24 14:39:03 2016 +0200
     1.2 +++ b/test/message_api_test.cc	Mon Oct 24 14:58:18 2016 +0200
     1.3 @@ -153,6 +153,17 @@
     1.4      assert(status7 == PEP_STATUS_OK);
     1.5      
     1.6      cout << enc_msg << endl;
     1.7 +
     1.8 +    string text5 = enc_msg;
     1.9 +    
    1.10 +    PEP_decrypt_flags_t dec_flags;
    1.11 +    stringlist_t* keys_used;
    1.12 +    
    1.13 +    PEP_STATUS status8 = MIME_decrypt_message(session, text5.c_str(), text5.length(), &dec_msg, &keys_used, &rating, &dec_flags);
    1.14 +    assert(status8 == PEP_STATUS_OK);
    1.15 +    
    1.16 +    cout << dec_msg << endl;
    1.17 +    
    1.18      
    1.19      cout << "freeing messages…\n";
    1.20      free_message(msg4);
    1.21 @@ -163,6 +174,8 @@
    1.22      free_message(msg5);
    1.23      cout << "done.\n";
    1.24  
    1.25 +    free(enc_msg);
    1.26 +    free(dec_msg);
    1.27      cout << "calling release()\n";
    1.28      release(session);
    1.29      return 0;