Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

934
Views
el antiguo contenedor php dice: curl: (60) Problema con el certificado SSL: el certificado ha caducado

Desde hace 1 o 2 días, mi antiguo contenedor php (dockerhub php:5.4-apache) ya no puede usar curl. este es el registro cuando se ejecuta curl dentro de este contenedor.

 $> docker run --rm -ti php:5.6-apache bash $> curl -X POST https://xxxxx.com curl: (60) SSL certificate problem: certificate has expired More details here: https://curl.haxx.se/docs/sslcerts.html curl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you can specify an alternate file using the --cacert option. If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL). If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option.

Esta misma llamada funciona en un sistema operativo moderno (actualizado).

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

la razón es que los cacerts del sistema operativo están desactualizados

Para actualizarlos necesitas hacer lo siguiente

 curl -k https://curl.se/ca/cacert.pem > cacert.pem # works : curl --cacert cacert.pem -X POST https://xxxxx.com apt-get install ca-certificates openssl x509 -outform der -in cacert.pem -out cacert.crt cp cacert.crt /usr/local/share/ca-certificates/ update-ca-certificates

otra opción :

 sed -i 's/mozilla\/DST_Root_CA_X3.crt/!mozilla\/DST_Root_CA_X3.crt/g' /etc/ca-certificates.conf update-ca-certificates

mejor opción (en mi humilde opinión):

 apt-get update apt-get upgrade -y
over 4 years ago · Santiago Trujillo Report

0

La respuesta de Raphael es algo correcta. Revisé el archivo https://curl.se/ca/cacert.pem y descubrí que a partir de hoy contiene el certificado CA Root de Digital Signature Trust Co. (DST Root CA X3). Por lo tanto, reemplazar su paquete de certificados Root CA puede no ser la respuesta, si contiene el mismo certificado caducado.

No queda claro qué cacert estás usando. ¿Puedes compartir?

No mencionaste qué sistema operativo es ese, así que asumiría que Linux.

Puede aislar la ubicación del certificado raíz de la CA del sistema operativo y comprobar si uno de sus certificados caducados es la causa.

Los pasos de este artículo son los mismos para cualquier certificado raíz de CA vencido en la cadena de certificados del paquete raíz de CA (por ejemplo, https://curl.se/ca/cacert.pem ). https://stackoverflow.com/a/69411107/1549092

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!