Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mdonath

Pages: [1]
1
SFTP / Why is CkSFtpFileW.get_CreateTime deprecated?
« on: March 27, 2018, 08:19:00 AM »
I use CkSFtpFileW.get_CreateTime to get the time stamp of a file on a (S)Ftp server. According to the documentation this method is deprecated. Why?
The 'get_CreateTimeStr' method is not a good replacement because I want to assign the time stamp to a date variable and I don't want to parse a string to get the date.

2
Email Protocols / Encode text attachment as base64
« on: January 22, 2018, 09:19:29 AM »
Each attachment of an email that is a text file ist encoded 'quoted-printable'. I would like to have it encoded 'base64'
Is that possible?

3
Encryption / Re: Decrypt Mail
« on: January 22, 2018, 09:15:23 AM »
Ok, that's it.

4
Encryption / Decrypt Mail
« on: January 10, 2018, 08:52:23 AM »
I have 2 emails (my and other). For both I have a .pfx file and a .cer file.
I succeed in sending a signed and encrypted mail:

   CkMailMan mailman;
   //...
   auto email = std::make_unique<CkEmail>();
   email->put_SendSigned(true);
   mailman.AddPfxSourceFile("my.pfx", "mypass");
   auto cert = std::make_unique<CkCert>();
   cert->LoadFromFile("other.cer");
   email->put_SendEncrypted(true);
   email->put_Pkcs7CryptAlg("3des");
   email->put_Pkcs7KeyLength(192);
   success = email->SetEncryptCert(*cert);
   mailman.put_OpaqueSigning(true);
   // ...
   mailman.SendEmail(*email);


But if I try to decrypt this mail in the other account:

   CkImap imap;
   //...
   CkMessageSet* messageSet = imap.Search("ALL",true);
   CkEmailBundle* bundle = imap.FetchHeaders(*messageSet);
   for (int i = 0; i < bundle->get_MessageCount(); i++) {
      CkEmail* email = bundle->GetEmail(i);
      email->AddPfxSourceFile("other.pfx", "otherpass");
      if (email->get_ReceivedEncrypted() == true)
            if (email->get_Decrypted() == true)
               Ok();

      delete email;
   }


I never reach ok (email->get_ReceivedEncrypted()  returns always false).

Any idea what's wrong here?

Pages: [1]