• Resolved alyxleclaire

    (@alyxleclaire)


    Hi there, I’m getting this PHP error below. I’m wondering whether it is an error on my end or a bug in the plugin.

    How bad is this for the functionality and security of my Site?

    And how do I fix it?

    Error: As shown on Query Monitor Plugin:

    Level:
    Warning (Suppressed)

    Message:
    openssl_x509_read(): supplied parameter cannot be coerced into an X509 certificate! 1

    Location:
    wp-content/plugins/wp-pgp-encrypted-emails/includes/class-wp-smime.php:55
    openssl_x509_read()
    wp-content/plugins/wp-pgp-encrypted-emails/includes/class-wp-smime.php:55
    WP_SMIME::getCertificate()
    wp-includes/class-wp-hook.php:287
    apply_filters(‘smime_certificate’)
    wp-content/plugins/wp-pgp-encrypted-emails/wp-pgp-encrypted-emails.php:393
    WP_PGP_Encrypted_Emails::getAdminCert()
    wp-content/plugins/wp-pgp-encrypted-emails/wp-pgp-encrypted-emails.php:554
    WP_PGP_Encrypted_Emails::registerAdminSettings()
    wp-includes/class-wp-hook.php:287
    do_action(‘admin_init’)
    wp-admin/admin.php:170

    Plugin: wp-pgp-encrypted-emails

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

    (@meitar)

    The warning is suppressed intentionally, so you are observing expected behavior. See the code itself.

    Thread Starter alyxleclaire

    (@alyxleclaire)

    Thanks. Glad to know its working as expected.

    If you don’t mind, could you expand on what the plugin is trying to do here and what the message means?

    "openssl_x509_read(): supplied parameter cannot be coerced into an X509 certificate!"

    Plugin Author Meitar

    (@meitar)

    If you don’t mind, could you expand on what the plugin is trying to do here and what the message means?

    It is just a PHP warning emitted by the OpenSSL PHP extension itself. The warning is emitted when the extension cannot create a variable of a given PHP resource data type from the provided input. This is to be expected when there is no valid S/MIME certificate, which will always be true before the user gives the system their valid S/MIME certificate and should never be true after they take this action. In the case where no valid S/MIME certificate data for the user exists, I handle the error by returning false, not by allowing the PHP warning to be emitted by the underlying OpenSSL extension.

    In the case where a valid S/MIME certificate is supplied by the user, then the warning is not emitted (and the error control operator therefore has no effect), and the function returns the valid S/MIME certificate resource in its native PHP form.

    You should consider reading the PHP manual section on Error Control Operators and the PHP manual’s chapter on its OpenSSL extension for further details.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘openssl_x509_read(): supplied parameter cannot be coerced into X509 certificate’ is closed to new replies.