Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self update error #1688

Closed
it-can opened this issue Apr 21, 2015 · 15 comments
Closed

Self update error #1688

it-can opened this issue Apr 21, 2015 · 15 comments

Comments

@it-can
Copy link

it-can commented Apr 21, 2015

The command phpunit --self-update will throw these errors:

Updating the PHPUnit PHAR ... PHP Warning:  file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php on line 849

Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php on line 849
PHP Warning:  file_get_contents(): Failed to enable crypto in phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php on line 849

Warning: file_get_contents(): Failed to enable crypto in phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php on line 849
PHP Warning:  file_get_contents(https://phar.phpunit.de/phpunit.phar): failed to open stream: operation failed in phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php on line 849

Warning: file_get_contents(https://phar.phpunit.de/phpunit.phar): failed to open stream: operation failed in phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php on line 849
 done

internal corruption of phar "phpunit-temp.phar" (truncated entry)
@ymhuang0808
Copy link

I also have the same problem.
The certification of phar.phpunit.de was changed, because, it is not the same with build/ca.pem

@hamdrew
Copy link

hamdrew commented Apr 22, 2015

Also getting the same issue.

@sebastianbergmann
Copy link
Owner

Yes, the certificate for phar.phpunit.de was updated. Now I need to remember how that ca.pem file is created.

@theseer
Copy link
Collaborator

theseer commented Apr 23, 2015

You don't "create" the ca.pem as that's been generated by the CA signing the new cert - Comodo in this case. For nginx's TLS handlanding you already have that in use as part of the chain/bundle pem file.

All you should have to do is replace the ca.pem file within the phar by the matching ca cert from comodo. And by matching i mean the one they use/supply for this type of certificate in use. For all practical means it should boil down to extracting the last cert section from the bundle-crt file into its own ca.pem file.

@sebastianbergmann
Copy link
Owner

Ah, now I remember. Hopefully will get around to do that tomorrow.

@sebastianbergmann
Copy link
Owner

Unfortunately extracting the last cert section from the bundle-crt file into its own ca.pem file does not seem to work.

@sebastianbergmann
Copy link
Owner

Nevermind, I found the correct PEM on Comodo's website.

@barbazul
Copy link

I am still geting this error

@ymhuang0808
Copy link

Hi, @barbazul
I think you should download the latest PHPUnit manually, because the PHPUnit 4.6.5 or later version contains the latest and correct SSL certificate.

@theseer
Copy link
Collaborator

theseer commented May 27, 2015

Every "old" version of PHPUnit shipping with the old cert is bound to have the same issue.

Since it's not (yet?) possible to have two certificates for the same domain with https, there is no workaround other than downloading the newer version manually.

@MichaelHindley
Copy link

Got this while updating from 4.7 to 4.8 today

@sebastianbergmann
Copy link
Owner

@NihilNovi I cannot reproduce what you describe

$ wget https://phar.phpunit.de/phpunit-4.7.7.phar
--2015-08-07 11:12:02--  https://phar.phpunit.de/phpunit-4.7.7.phar
Resolving phar.phpunit.de (phar.phpunit.de)... 188.94.27.25
Connecting to phar.phpunit.de (phar.phpunit.de)|188.94.27.25|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3100940 (3.0M) [application/octet-stream]
Saving to: ‘phpunit-4.7.7.phar’

phpunit-4.7.7.phar  100%[=======================>]   2.96M  3.16MB/s   in 0.9s   

2015-08-07 11:12:03 (3.16 MB/s) - ‘phpunit-4.7.7.phar’ saved [3100940/3100940]


$ php phpunit-4.7.7.phar --self-update
PHPUnit 4.7.7 by Sebastian Bergmann and contributors.

Updating the PHPUnit PHAR ...  done


$ php phpunit-4.7.7.phar --version    
PHPUnit 4.8.0 by Sebastian Bergmann and contributors.

@MichaelHindley
Copy link

@sebastianbergmann try running self-update again afterwards

@sebastianbergmann
Copy link
Owner

That is a different (new) issue: #1815.

@MichaelHindley
Copy link

Ah ok, thank you for pointing that out, serves me right to get here by google search instead of the issue tracker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants