Closed JobirYusupov closed 3 years ago
@JobirYusupov Could you post the full response of the server here? The snippet suggests that you still have issues with openSSL as I think the CSR is not valid (that is created on the fly).
Closing this, feel free to re-open if you wish to add something.
I found the solution, error was on toDer function on Helper.php, I'm on windows and this returned an empty string.
Changed line from this:
$lines = explode(PHP_EOL, $pem);
To this:
$lines = preg_split('/\r\n|\r|\n/', $pem);
Now is working as expected
Thanks
Just a note to say that I had this exact problem! Thank you @mxprogramer for posting your workaround. I wonder if we could do something to check if windows or not and do an if for future releases. I'll have a think at some point.
Thanks for the update. To my knowledge PHP_EOL was was working the same on windows as on Linux, therefore I could not comprehend the situation, but it seems like you have ran into something that is also described here
https://stackoverflow.com/questions/35625268/php-eol-on-windows-and-linux
https://eidson.info/post/php_eol_is_broken
I agree and think we should change this to your suggestion. So maybe just replace explode(PHP_EOL... with preg_match(...
Could you go ahead and add a PR?
Cheers and thanks for taking to time to point it out!
Op zo 28 jun. 2020 19:29 schreef Matt Moore notifications@github.com:
Just a note to say that I had this exact problem! Thank you @mxprogramer https://github.com/mxprogramer for posting your workaround. I wonder if we could do something to check if windows or not and do an if for future releases. I'll have a think at some point.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/afosto/yaac/issues/8#issuecomment-650797342, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFROB2EK2KS3SPWHFZYOA53RY54W7ANCNFSM4MFGJ3EA .
Fixed with https://github.com/afosto/yaac/pull/34 Thanks @gpibarra
class TestAcme2Controller extends ZControlCmd {
}
error: Exception 'GuzzleHttp\Exception\ClientException' with message 'Client error: POST https://acme-staging-v02.api.letsencrypt.org/acme/finalize/13081845/84000364 resulted in a 400 Bad Request response: { "type": "urn:ietf:params:acme:error:malformed", "detail": "Error parsing certificate request: asn1: syntax error: (truncated...) '