3

The problem: Try to communicate with s3 via aws sdk for php and you get this: "cURL error: SSL peer certificate or SSH remote key was not OK (cURL error code 51)."

Often suggested is to disable ssl verification in development. However, equal nuisance seeing as now the sdk throws a warning about it being unsafe to disable ssl verification. I can't disable warnings in PHP in my dev environment.

What are my options?

http://curl.haxx.se/docs/sslcerts.html solutions (aside from the 1st suggestion?!) would require modification of the sdk.

I have confirmed via sdk_compatibility_test.php that I have "7.26.0 (OpenSSL/1.0.1c)" when what isi required is "7.15.0 or newer, with SSL". In addition, I have installed php's openssl module as confirmed by php info.

I've even tried pointing "certificate_authority" to various crt files to no avail. Usually resulting in a new error: "cURL error: SSL certificate problem: self signed certificate in certificate chain (cURL error code 60)"

This year old answer doesn't appear to help either.

Community
  • 1
  • 1
Aaron
  • 371
  • 5
  • 13

1 Answers1

1

The problem stems mostly from using s3 bucket names with multiple dots.

$s3instance->path_style = true;

See: Lengthy discussion on aws forums

Aaron
  • 371
  • 5
  • 13