SMIME Internal Server Error on Certificate Verify

  • When opening a SMIME signed mail (internally sent) I get an error 500 on Apache. That is the log file. Any advice? (Running latest SMIME Plugin and Core build 520)

    [Sat Oct 21 19:01:50.591129 2017] [:error] [pid 23380] [client x] PHP Fatal error:  Uncaught Error: Call to undefined function WAYF\\bcmul() in /usr/share/kopano-webapp/plugins/smime/php/lib/Der.php:68\nStack trace:\n#0 /usr/share/kopano-webapp/plugins/smime/php/lib/X509.php(124): WAYF\\Der->next(2)\n#1 /usr/share/kopano-webapp/plugins/smime/php/lib/X509.php(110): WAYF\\X509->tbsCertificate()\n#2 /usr/share/kopano-webapp/plugins/smime/php/lib/X509.php(104): WAYF\\X509->certificate_do()\n#3 /usr/share/kopano-webapp/plugins/smime/php/class.certificate.php(306): WAYF...')\n#4 /usr/share/kopano-webapp/plugins/smime/php/plugin.smime.php(901): Certificate->verify()\n#5 /usr/share/kopano-webapp/plugins/smime/php/plugin.smime.php(256): Pluginsmime->verifyOCSP('-----BEGIN CERT...', Array)\n#6 /usr/share/kopano-webapp/plugins/smime/php/plugin.smime.php(380): Pluginsmime->verifyMessage(Resource id #19, 'Content-type: m...')\n#7 /usr/share/kopano-webapp/plugins/smime/php/plugin.smime.php(94): Pluginsmime->onSignedMessage(Array)\n#8 /usr/share/k in /usr/share/kopano-webapp/plugins/smime/php/lib/Der.php on line 68, referer: https://x/webapp/

  • Good morning,

    I am having a similar problem. When I open an encrypted email I get an error and in the log file I can see this:

    Mon Jul 01 14:18:05.950394 2019] [:error] [pid 9089] [client] PHP Fatal error: Uncaught Error: Call
    to undefined function WAYF\\bcmul() in /usr/share/kopano-webapp/plugins/smime/php/lib/Der.php:68\nStack trace:\n#0 /
    usr/share/kopano-webapp/plugins/smime/php/lib/X509.php(124): WAYF\\Der->next(2)\n#1 /usr/share/kopano-webapp/plugins/
    smime/php/lib/X509.php(110): WAYF\\X509->tbsCertificate()\n#2 /usr/share/kopano-webapp/plugins/smime/php/lib/X509.php
    (104): WAYF\\X509->certificate_do()\n#3 /usr/share/kopano-webapp/plugins/smime/php/class.certificate.php(307): WAYF\\
    X509->certificate('0\\x82\\x05\\xA20\\x82\\x04\\x8A\\xA0\\x03\\x02\\x01\\x02\\x02\\x08...')\n#4 /usr/share/kopano-web
    app/plugins/smime/php/util.php(163): Certificate->verify()\n#5 /usr/share/kopano-webapp/plugins/smime/php/plugin.smim
    e.php(270): verifyOCSP('-----BEGIN CERT...', Array, Array)\n#6 /usr/share/kopano-webapp/plugins/smime/php/plugin.smim
    e.php(386): Pluginsmime->verifyMessage(Resource id #15, 'Content-Type: m...')\n#7 /usr/share/kopano-webapp/plugins/sm
    ime/php/plugin.smime.php(94): Pluginsmime->onSignedMessage(Array)\n#8 /usr/share/kopano-webapp/s in /usr/share/kopano
    -webapp/plugins/smime/php/lib/Der.php on line 68, referer:     

    What do I need to do?

  • Kopano

    Could you share information about your setup?
    OS, php version, WebApp version etc

  • @marty

    Kopano Core:

    And the latest version of the S/MIME plugin downloaded from the community site yesterday.

    root@mrc-ubz64:~# php --version                                                                                                                                     
    PHP 7.0.33-0+deb9u3 (cli) (built: Mar  8 2019 10:01:24) ( NTS )                                                                                                     
    Copyright (c) 1997-2017 The PHP Group                                                                                                                               
    Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies                                                                                                       
        with Zend OPcache v7.0.33-0+deb9u3, Copyright (c) 1999-2017, by Zend Technologies               

  • @yep_DD
    I am having exactly the same problem

  • Note that I am able to view the email from my mobile phone and also if I forward it.

  • @marty

    I was wondering if you need any further information or log files for this.

  • Kopano

    By the look at the error it seems you’re missing php-bcmath (or it’s not active)

  • @marty

    Marty that fixed my problem! Thanks a lot!!

    Question: should that package be in some dependencies? For example of the S/MIME plugin?

    Otherwise how do people know that they have to install it?

  • Kopano

    @mcostan This should be the case already:

    Ubuntu 16.04 example:

    apt-cache depends kopano-webapp-plugin-smime
      Depends: kopano-webapp
      Depends: php-kopano-smime
     |Depends: <php5-curl>
      Depends: php-curl
      Depends: php-xml
      Depends: php-bcmath
      Conflicts: <kopano-webapp-smime>
      Replaces: <kopano-webapp-smime>

    Did you upgrade your OS and php-version recently? I can imagine some issues there, but that’s something for the admin to double check imo.

  • I updated PHP a few months back and then installed the latest SMIME plugin.

    Perhaps it found the old PHP dependency which was installed with the old version of PHP and it thought it was ok…

  • Problem fixed, thanks a lot!

Log in to reply