mhujer / fio-api-php

PHP implementation of Fio Bank API
MIT License
32 stars 31 forks source link

Updated client CA cert #31

Closed feldsam closed 4 months ago

feldsam commented 4 months ago

Hi, on some systems I was getting error

Code:0 Message:cURL error 60: Peer's certificate issuer has been marked as not trusted by the user. (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://fioapi.fio.cz/v1/rest/

and I figured out, that shipped certificate have to be updated

mhujer commented 4 months ago

@feldsam Hi, thanks for the PR! I'm not sure that including the certificate in the repo still makes sense. Maybe it would be better if it depended on composer/ca-bundle directly? What do you think?

//cc @soukicz ?

feldsam commented 4 months ago

There is actually dep on \Kdyby\CurlCaBundle\CertificateHelper, but there is also fallback, if this is not installed. So I just updated fallback cert.

But, it makes sense move suggest dep to required dep and drop fallback

soukicz commented 4 months ago

I'm not sure that including the certificate in the repo still makes sense

It is nice that it can run without dependencies. And it is just fallback because it is already using composer/ca-bundle if it is available.

feldsam commented 4 months ago

There is still guzzlehttp/guzzle dep and I think, that it is better to use ca-bundle instead of maintaining cert in repo as @mhujer pointed.

feldsam commented 4 months ago

So I updated my commit to remove fallback and cert from repo and refactored code to use ca-bundle only

mhujer commented 4 months ago

@feldsam thanks! merged and tagged as 5.0.0