afosto/yaac

Error occurs after create new Client object

Closed this issue · 5 comments

Hello, I got error message after creation Client object?

PHP Warning 'yii\base\ErrorException' with message 'openssl_pkey_export(): cannot get key from parameter 1'

Thanks for reporting, sounds like openssl is causing issues here:

$key = openssl_pkey_new([
            'private_key_bits' => 4096,
            'private_key_type' => OPENSSL_KEYTYPE_RSA,
        ]);
openssl_pkey_export($key, $pem);

$key is most likely not a valid resource. Could you verify openssl is working correctly: https://www.php.net/manual/en/function.openssl-pkey-new.php

@bakkerpeter , thanks for response, but I've got next:
"Count not verify ownership via HTTP" for sert.zetsoft.uz in the block :
if (!$client->selfTest($authorization, Client::VALIDATION_HTTP)) {
throw new \Exception('Count not verify ownership via HTTP');
}
but $client::VALIDATION_HTTP returns 'http-01',
any suggetions please

@Umid-Berdiev First to contribute to this package and help other users facing your first issue, could you please describe what the issue was and how you fixed it?

@Umid-Berdiev Regarding your issue with HTTP validation; a major step in obtaining an LetsEncrypt certificate is, as described in the ACME protocol, to prove ownership via either DNS directly or an HTTP call to your domain which must point to your server.

Please read more about the basics here: https://letsencrypt.org/how-it-works/
And about validating challenges here: https://letsencrypt.org/docs/challenge-types/

Closing this, feel free to re-open if you wish to add something.