[pyar] error de conexión ssl

Lucas Gz resourceldg en gmail.com
Lun Jul 23 12:44:42 -03 2018


Buen día mi nombre es Lucas (Fierro) esta es mi primer consulta a la lista,
la verdad es que había que animarse y siempre hay una primera vez para
todo. Soy nuevo en todo lo referido a programación os pido paciencia, voy a
intentar ser lo mas claro posible con lo que sucede.

Configurando el certificado SSL me encuentro con los siguiente errores
(aparentemente aleatorios) en varios navegadores y dispositivoS
principalmente moviles android versiones 4, 5 y hasta 6 pude testearlo:
*NET*::*ERR_CERT_AUTHORITY_INVALID o ERROR DE CONEXION SSL*

*Detalle del error en chrome: "El servidor no pudo probar que su dominos es
....configuracion incorrecta ..."*

Nuestro humilde proyecto cooperativo esta estructurado en Ngnix>Gunicorn>
Supervisor> Django (creo en ese orden)

El sitio está alojado en donweb  donde venden el certificado (RapidSSL)
pero solo tienen soporte para distros ferozo con lo cual tuve que
configurar todo como me parecía y creo que el problema viene por el lado de
que no tengo un certificado intermedio. Para lograr esto me pide que para
solicitar un certificado intermedio al link "
https://www.digicert.com/digicert-root-certificates.htm#intermediates" el
cual no se cómo o con qué comando puedo descargarlo directamente al
servidor (ubuntu 16.04 64bits) y menos configurarlo en el orden correcto.

Mi pregunta principal es si es normal que los ssl en muchos S.O. y
navegadores
surja este error o es algo de lo que debo ocuparme configurandolo
correctamente y con código se puede mejorar.
hice varias veces el test de https://www.ssllabs.com/ Y algo que me está
faltando tambien es la CAA que creo que donweb no esta el lista y el sus
DNS no tiene la opcion de configurar un RR

debajo dejo el detalle de las versiones y los archivos de configuracion y
sino en este linkode https://linkode.org/#eIV10JSIALSZnOUWgpYXv1
para el que le quede mas cómodo.

PD: Por seguridad las claves estan modificadas.

MUCHAS GRACIAS!!


nginx version: nginx/1.10.3 (Ubuntu)
OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016


// IMPUT: nginx/sites-enabled/nano ...

upstream btn_server {
  # fail_timeout=0 means we always retry an upstream even if it failed
  # to return a good HTTP response (in case the Unicorn master nukes a
  # single worker for timing out).
  server unix:/home/ubuntu/env/run/gunicorn.sock fail_timeout=0;
}

server {

    listen   80;
    server_name .bitnativo.com www.bitnativo.com;
    return 301 https://bitnativo.com$request_uri;

}

server {
        listen 443 ssl;
        ssl on;
        ssl_certificate /etc/nginx/ssl/nginx.crt;
        ssl_certificate_key /etc/nginx/ssl/nginx.key;
        root /var/www/html/index.nginx-debian.html;

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers
ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:E$
        ssl_prefer_server_ciphers on;
        ssl_session_cache shared:SSL:10m;
        ssl_dhparam /etc/ssl/certs/dhparam.pem;

        ssl_session_timeout 1d;
        ssl_session_tickets off;


        # HSTS (ngx_http_headers_module is required) (15768000 seconds = 6
mont$
        # add_header Strict-Transport-Security max-age=15768000;

        # OCSP Stapling ---
        # fetch OCSP records from URL in ssl_certificate and cache them
        ssl_stapling on;
        ssl_stapling_verify on;

        # verify chain of trust of OCSP response using Root CA and
Intermediate$
        ssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;



    client_max_body_size 4G;
    access_log /home/ubuntu/logs/nginx-access.log;
    error_log /home/ubuntu/logs/nginx-error.log;

    location /static/ {
        alias  /home/ubuntu/static_s/static_root/;
    }

     location / {

        # an HTTP header important enough to have its own Wikipedia entry:
        #   http://en.wikipedia.org/wiki/X-Forwarded-For
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;


        # enable this if and only if you use HTTPS, this helps Rack
        # set the proper protocol for doing redirects:
         proxy_set_header X-Forwarded-Proto https;

        # pass the Host: header from the client right along so redirects
        # can be set properly within the Rack application
        proxy_set_header Host $http_host;

        # we don't want nginx trying to do something clever with
        # redirects, we set the Host: header above already.
        proxy_redirect off;

        # set "proxy_buffering off" *only* for Rainbows! when doing
        # Comet/long-poll stuff.  It's also safe to set if you're
        # using only serving fast clients with Unicorn + nginx.
        # Otherwise you _want_ nginx to buffer responses to slow
        # clients, really.
        # proxy_buffering off;

        # Try to serve static files from nginx, no point in making an
        # *application* server like Unicorn/Rainbows! serve static files.
        if (!-f $request_filename) {
            proxy_pass http://btn_server;
            break;

        }
    }
}


//INPUT P VER LOS CERTIFICADOS: openssl s_client -connect
www.bitnativo.com:443 -showcerts

//OUTPUT...

CONNECTED(00000003)
depth=0 CN = bitnativo.com
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 CN = bitnativo.com
verify error:num=21:unable to verify the first certificate
verify return:1
---
Certificate chain
 0 s:/CN=bitnativo.com
   i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=RapidSSL RSA CA 2018
-----BEGIN CERTIFICATE-----
M6g/ATxLl+TOu4MTH7Ma+BvkcsAm4QJvCC4JM+HmUgJ3TFdovexmPQdT25zz7DKX
kSUnUISER28FKaMkyy1SaCHIliGg3opzVIhkKXyz3P+d3KIzslKMMcRLjB0g0mLl
l/L9PE3IDM9XSZxRNmBcCCo48UIg7OvRPVPnfOwIIxDOPTWSvhH5pnNnvxO3GpBl
6da5CL7qUGMA6nhYkCEwPCRLOdAuadYqcm7V0NYWc80d7dGtFeJldfr/Xo64SgO/
JVriqlNpZl1HAgMBAAGjggK3MIICszAfBgNVHSMEGDAWgBRTyhdZ/GvAAyEvGq7k
qqgcglbadTAdBgNVHQ4EFgQULnfHqxKwmEXmngr+oyImei3a57gwKwYDVR0RBCQw
IoINYml0bmF0aXZvLmNvbYIRd3d3LmJpdG5hdGl2by5jb20wDgYDVR0PAQH/BAQD
AgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjA+BgNVHR8ENzA1MDOg
MaAvhi1odHRwOi8vY2RwLnJhcGlkc3NsLmNvbS9SYXBpZFNTTFJTQUNBMjAxOC5j
cmwwTAYDVR0gBEUwQzA3BglghkgBhv1sAQIwKjAoBggrBgEFBQcCARYcaHR0cHM6
Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAIBgZngQwBAgEwdQYIKwYBBQUHAQEEaTBn
MCYGCCsGAQUFBzABhhpodHRwOi8vc3RhdHVzLnJhcGlkc3NsLmNvbTA9BggrBgEF
BQcwAoYxaHR0cDovL2NhY2VydHMucmFwaWR
-----END CERTIFICATE-----
---
Server certificate
subject=/CN=bitnativo.com
issuer=/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=RapidSSL RSA CA 2018
---
No client certificate CA names sent
Peer signing digest: SHA512
Server Temp Key: ECDH, P-256, 256 bits
---
SSL handshake has read 1981 bytes and written 431 bytes
---
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-GCM-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-RSA-AES256-GCM-SHA384
    Session-ID: 85290D91CA6CAECA7FC949F0230D7AE7875514
    Session-ID-ctx:
    Master-Key: 25BABC3E6D73A4ED8045D24571F512BF2BE72C872C80
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1532356180
    Timeout   : 300 (sec)
    Verify return code: 21 (unable to verify the first certificate)
---
closed
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://listas.python.org.ar/pipermail/pyar/attachments/20180723/2c244e4d/attachment.html>


Más información sobre la lista de distribución pyar