Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

S/MIME encryption not working

#491

I'm having problem with the S/MIME encryption. Signing works fine (except that it's not recognised on iOS devices but might be a problem with the iOS mail app), but encryption doesn't work at all.

It says:
Failed to find certificate to encrypt for ************.
One or more parameters passed to a function were not valid. Error code: -50

I have GPGtools installed as well. S/MIME works fine in Apple Mail so not a problem with the certificate etc.

Reported by Christian · November 18th, 2013 @ 11:37 AM

State: new
Milestone: none
Assigned to: benny benny

Activity

  1. Christian
    Christian

    I would be grateful if someone would try to help me sorting this out. Perhaps I should give some more details on the problem/my setup?

    I'm running Snow Leopard. As mentioned above, signing seems to work but not encryption. In Apple Mail both signing and encryption works so I guess that means the certificate is installed correctly.

    November 22nd, 2013 @ 10:54 AM

  2. benny
    benny

    The error message you get says that MailMate is providing an invalid parameter, so let's try finding out what that is.

    First enabled debug output in the Terminal:

    defaults write com.freron.MailMate MmDebugSecurity -bool YES
    

    Then launch MailMate from the Terminal:

    /Applications/MailMate.app/Contents/MacOS/MailMate
    

    Try encrypting and provide the output in the Terminal. By email if you like (“Help ▸ Send Feedback”).

    Thanks in advance.

    November 22nd, 2013 @ 11:12 AM

  3. Christian
    Christian

    Thanks for your quick reply.

    Here is the output:

    Searching for certificate for ********  
     Result: Failure
     Detail: Failed to find certificate to encrypt for **********.
     Detail: One or more parameters passed to a function were not valid. Error code: -50
    2013-11-22 12:16:02.207 MailMate[24211:903] Warning: Unknown security problem (S/MIME): unknown  
    2013-11-22 12:16:02.276 MailMate[24211:903] Warning: Unknown security problem (S/MIME): unknown  
    2013-11-22 12:16:02.420 MailMate[24211:903] Warning: Unknown security problem (S/MIME): unknown
    

    I do have a certificate for the email address in keychain and it works in Apple Mail. I did however have an issue with MailMate trying to use an old expired certificate instead of a new one which I solved by deleting the old certificate (which isn't ideal obviously but it was a certificate that I hadn't used anyway so not an issue). Could it be that MailMate is still trying to use the deleted certificate instead of the new one.

    The odd thing is that signing works fine...

    November 22nd, 2013 @ 11:21 AM

  4. Christian
    Christian

    Actually just tried with another email address for which I have not had the problems above with an old certificate and same issue.

    November 22nd, 2013 @ 11:33 AM

  5. benny
    benny

    No, signing works fine which means your certificate is fine. When encrypting, you need the certificate of the recipient. This is what fails to work correctly. There is some indication that the problem is not really that it's missing: “One or more parameters passed to a function were not valid.”

    It seems the only parameter is ********. Anything special about that? Can you send the address to me by private email? Are you sure you have a certificate for that address?

    November 22nd, 2013 @ 11:33 AM

  6. Christian
    Christian

    Just sent you an email from the address in question. Nothing special with the address as far as I know. Also signed the email so I guess you could try to encrypt an email on your side with that certificate.

    Have tried with two different recipient addresses. Same problem. Both certificates work fine in Apple Mail.

    I realise that I need the recipient's certificate for encrypting and my own for signing and I think I'm doing that part of it correctly, so don't think the problem lies there.

    November 22nd, 2013 @ 11:45 AM

  7. benny
    benny

    Which version of OS X are you using?

    November 22nd, 2013 @ 11:53 AM

  8. Christian
    Christian

    Using 10.6.

    Added your certificate and tried to encrypt. Same problem.

    November 22nd, 2013 @ 12:00 PM

  9. benny
    benny

    10.6 is not officially supported, but I'm not sure the problem is related to 10.6. Do you have any way to check if you have the same problem on 10.7+?

    November 22nd, 2013 @ 12:02 PM

  10. Christian
    Christian

    Ah, didn't even realise. :) It works perfectly on 10.6 apart from this issue.

    No, unfortunately not now. But if that's the cause, it's not a big deal. Upgrading in a couple of weeks. Could follow up on it then.

    November 22nd, 2013 @ 12:28 PM

  11. benny
    benny
    • State changed from new to cantreproduce

    Ok, thanks. I'll leave the ticket in a cantreproduce state, but you are welcome to add new comments when you have upgraded.

    November 22nd, 2013 @ 12:29 PM

  12. Christian
    Christian

    Updated to Mavericks and it seems to be working fine now so guess it was due to Snow Leopard.

    December 9th, 2013 @ 04:38 PM

  13. benny
    benny
    • State changed from cantreproduce to closed

    Thanks for the update. I'll close the ticket.

    December 9th, 2013 @ 10:49 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.