• Resolved lostingraphics

    (@lostingraphics)


    Dear Meitar,
    it is probably hard to reconstruct, but maybe you know already a quick answer.

    I would like to encrypt my wordpress mails with a S/MIME certificate and on my local machine it is working, but unfortunately not on the production server.
    I tried to find the difference between both environments, and cause you wrote “S/MIME support requires the OpenSSL PHP extension.” I finally checked this:

    My local environment:
    OpenSSL support enabled
    OpenSSL Library Version OpenSSL 1.1.1d 10 Sep 2019
    OpenSSL Header Version OpenSSL 1.1.1g 21 Apr 2020

    Hoster:
    OpenSSL support enabled
    OpenSSL Library Version OpenSSL 1.1.1d 10 Sep 2019
    OpenSSL Header Version OpenSSL 1.1.1d 10 Sep 2019

    The other specs should not be a problem:
    My local environment: WP 5.6.1, your plugin 0.7.4, PHP7.2
    Hoster: WP 5.6.1, your plugin 0.7.4, PHP7.3

    I will try to ask the webhoster to update the extension, but it is a big, not so userfriendly company.
    But maybe you already know, if the older header version could be the reason? Or that it should work and I have to go on searching?

    I test always with your built-in test mail.

    btw. encryption via pgp key works on both environments like a charm.

    thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Meitar

    (@meitar)

    I would be surprised if an update to the OpenSSL extension on your hosting provider would fix this problem; it’s recent enough that it should work. I would continue to look at other possible causes if I were you, though I don’t have any specific advice for where you should look.

    Thread Starter lostingraphics

    (@lostingraphics)

    Thanks for your answer!

    I finally found the reason. On the server of the provider the php variable open_basedir was set so that sys_get_temp_dir could somehow not find the right tmp folder.

    As long as I cannot convince them to change this, I changed the lines 124 / 125 in class-wp-smime.php from

    
    $infile  = tempnam( sys_get_temp_dir(), 'wp_email_' );
    $outfile = tempnam( sys_get_temp_dir(), 'wp_email_' );
    

    to

    
    $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();
    $infile  = tempnam( $tmp_dir, 'wp_email_' );
    $outfile = tempnam( $tmp_dir, 'wp_email_' );
    

    Of course it is just a temporary solution, but it works for now.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Is there a minimum OpenSSL version needed?’ is closed to new replies.