Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SSL: problema sec_error_untrusted_issuer
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
fbcyborg
Advocate
Advocate


Joined: 16 Oct 2005
Posts: 3056
Location: ROMA

PostPosted: Tue Jan 12, 2010 1:47 pm    Post subject: SSL: problema sec_error_untrusted_issuer Reply with quote

Salve a tutti,
ho un problema con il mio server apache che ha il supporto SSL.
Fin'ora ha sempre funzionato bene, e devo dire che in locale non ho problemi, ma se accedo da remoto ad un sito che è presente qui sul server, ottengo l'errore in oggetto per quanto riguarda il certificato.
Inizialmente questo problema ce l'avevo solo con firefox da windows, dato che da un altro PC linux funzionava. Avevo provato con Internet Explorer e non ci sono stati problemi a caricare la pagina anche se il browser comunicava che c'era stato qualche problema.

Ho rifatto i certificati come dice anche qui, ma non ho risolto nulla, anzi... anche se in locale funziona sempre, da remoto, una volta acquisito il certificato non c'è verso di far caricare la pagina.

Comunque da Linux non ci sono problemi. La pagina mi viene caricata anche se viene mostrato quel messaggio di sec_error_untrusted_issuer. Evidentemente è winzozz che da problemi, ma non capisco perché.

Dove potrebbe essere il problema secondo voi?
_________________
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Back to top
View user's profile Send private message
mrfree
Veteran
Veteran


Joined: 15 Mar 2003
Posts: 1303
Location: Europe.Italy.Sulmona

PostPosted: Wed Jan 13, 2010 2:37 pm    Post subject: Reply with quote

Quale URL utilizzi quando ti connetti da locale? È uguale a quella che invece usi da remoto?
_________________
Please EU, pimp my country!

ICE: /etc/init.d/iptables panic
Back to top
View user's profile Send private message
fbcyborg
Advocate
Advocate


Joined: 16 Oct 2005
Posts: 3056
Location: ROMA

PostPosted: Wed Jan 13, 2010 2:48 pm    Post subject: Reply with quote

Quando mi connetto in locale uso https://localhost/websvn mentre invece quando sono in remoto con https://192.168.1.100/websvn (<- che funziona anche da locale ovviamente).
_________________
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Back to top
View user's profile Send private message
mrfree
Veteran
Veteran


Joined: 15 Mar 2003
Posts: 1303
Location: Europe.Italy.Sulmona

PostPosted: Wed Jan 13, 2010 8:32 pm    Post subject: Reply with quote

Prova postando anche la configurazione di apache (almeno la parte riguardante i vhosts, sempre se usi questa funzionalità)
_________________
Please EU, pimp my country!

ICE: /etc/init.d/iptables panic
Back to top
View user's profile Send private message
fbcyborg
Advocate
Advocate


Joined: 16 Oct 2005
Posts: 3056
Location: ROMA

PostPosted: Wed Jan 13, 2010 8:44 pm    Post subject: Reply with quote

Questo è il file /etc/conf.d/apache2:
Code:
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5"
APACHE2_OPTS="${APACHE2_OPTS} -D SVN -D SVN_AUTHZ -D DAV -D DAV_FS"
CONFIGFILE=/etc/apache2/httpd.conf

E questo è il file /etc/apache2/httpd.conf:
Code:
ServerRoot "/usr/lib64/apache2"                                                                     
ServerName "Gentoo"                                                                             
LoadModule actions_module modules/mod_actions.so                                                   
LoadModule alias_module modules/mod_alias.so                                                       
LoadModule auth_basic_module modules/mod_auth_basic.so                                             
LoadModule authn_alias_module modules/mod_authn_alias.so                                           
LoadModule authn_anon_module modules/mod_authn_anon.so                                             
LoadModule authn_dbm_module modules/mod_authn_dbm.so                                               
LoadModule authn_default_module modules/mod_authn_default.so                                       
LoadModule authn_file_module modules/mod_authn_file.so                                             
<IfDefine AUTHNZ_LDAP>                                                                             
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so                                           
</IfDefine>                                                                                         
LoadModule authz_dbm_module modules/mod_authz_dbm.so                                               
LoadModule authz_default_module modules/mod_authz_default.so                                       
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so                                   
LoadModule authz_host_module modules/mod_authz_host.so                                             
LoadModule authz_owner_module modules/mod_authz_owner.so                                           
LoadModule authz_user_module modules/mod_authz_user.so                                             
LoadModule autoindex_module modules/mod_autoindex.so                                               
<IfDefine CACHE>                                                                                   
LoadModule cache_module modules/mod_cache.so                                                       
</IfDefine>                                                                                         
LoadModule cgi_module modules/mod_cgi.so                                                           
<IfDefine DAV>                                                                                     
LoadModule dav_module modules/mod_dav.so                                                           
</IfDefine>                                                                                         
<IfDefine DAV>                                                                                     
LoadModule dav_fs_module modules/mod_dav_fs.so                                                     
</IfDefine>                                                                                         
<IfDefine DAV>                                                                                     
LoadModule dav_lock_module modules/mod_dav_lock.so                                                 
</IfDefine>                                                                                         
LoadModule deflate_module modules/mod_deflate.so                                                   
LoadModule dir_module modules/mod_dir.so                                                           
<IfDefine CACHE>                                                                                   
LoadModule disk_cache_module modules/mod_disk_cache.so                                             
</IfDefine>                                                                                         
LoadModule env_module modules/mod_env.so                                                           
LoadModule expires_module modules/mod_expires.so                                                   
LoadModule ext_filter_module modules/mod_ext_filter.so                                             
<IfDefine CACHE>                                                                                   
LoadModule file_cache_module modules/mod_file_cache.so                                             
</IfDefine>
LoadModule filter_module modules/mod_filter.so
LoadModule headers_module modules/mod_headers.so
LoadModule include_module modules/mod_include.so
<IfDefine INFO>
LoadModule info_module modules/mod_info.so
</IfDefine>
<IfDefine LDAP>
LoadModule ldap_module modules/mod_ldap.so
</IfDefine>
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
<IfDefine CACHE>
LoadModule mem_cache_module modules/mod_mem_cache.so
</IfDefine>
LoadModule mime_module modules/mod_mime.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule speling_module modules/mod_speling.so
<IfDefine SSL>
LoadModule ssl_module modules/mod_ssl.so
</IfDefine>
<IfDefine STATUS>
LoadModule status_module modules/mod_status.so
</IfDefine>
LoadModule unique_id_module modules/mod_unique_id.so
<IfDefine USERDIR>
LoadModule userdir_module modules/mod_userdir.so
</IfDefine>
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
User apache
Group apache
Include /etc/apache2/modules.d/*.conf
Include /etc/apache2/vhosts.d/*.conf


Poi non so.. ce ne sono altri, dimmi tu se vuoi vedere qualche altro file in particolare.

Grazie!
_________________
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Back to top
View user's profile Send private message
mrfree
Veteran
Veteran


Joined: 15 Mar 2003
Posts: 1303
Location: Europe.Italy.Sulmona

PostPosted: Thu Jan 14, 2010 2:51 pm    Post subject: Reply with quote

Nel tuo post iniziale hai detto di aver rigenerato i certificati, hai sostituito quello di default in /etc/apache2/ssl oppure hai creato un tuo file di configurazione in /etc/apache2/vhosts.d definendo un virtualhost?

Posta inoltre l'output di questo comando per favore
Code:
openssl x509 -noout -in server.crt -issuer
dove server.crt è il file con il certificato da te generato
_________________
Please EU, pimp my country!

ICE: /etc/init.d/iptables panic
Back to top
View user's profile Send private message
fbcyborg
Advocate
Advocate


Joined: 16 Oct 2005
Posts: 3056
Location: ROMA

PostPosted: Thu Jan 14, 2010 3:02 pm    Post subject: Reply with quote

Ciao, e grazie ancora per il supporto. ;)

Quello che ho fatto è stata solamente la sostituzione di quelli di default in /etc/apache2/ssl, però devo dire che in /etc/apache2/vhosts.d ho un file che ho modificato per le mie esigenze, ovvero questo: 00_default_ssl_vhost.conf :
Code:
<IfDefine SSL>                                                                                                             
<IfDefine SSL_DEFAULT_VHOST>                                                                                               
<IfModule ssl_module>                                                                                                       
Listen 443                                                                                                                 
<VirtualHost _default_:443>                                                                                                 
        ServerName localhost                                                                                               
        Include /etc/apache2/vhosts.d/default_vhost.include                                                                 
        ErrorLog /var/log/apache2/ssl_error_log                                                                             
        <IfModule log_config_module>                                                                                       
                TransferLog /var/log/apache2/ssl_access_log                                                                 
        </IfModule>                                                                                                         
        SSLEngine on
        SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
        SSLCertificateFile /etc//apache2/ssl/server.crt
        SSLCertificateKeyFile /etc/apache2/ssl/server.key
        <FilesMatch "\.(cgi|shtml|phtml|php)$">
                SSLOptions +StdEnvVars
        </FilesMatch>
        <Directory "/var/www/localhost/cgi-bin">
                SSLOptions +StdEnvVars
        </Directory>
        <IfModule setenvif_module>
                BrowserMatch ".*MSIE.*" \
                        nokeepalive ssl-unclean-shutdown \
                        downgrade-1.0 force-response-1.0
        </IfModule>
        <IfModule log_config_module>
                CustomLog /var/log/apache2/ssl_request_log \
                        "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
        </IfModule>
</VirtualHost>
</IfModule>
</IfDefine>
</IfDefine>

Ma l'ho modificato solo per indicare correttamente i path ai certificati, che ovviamente erano sbagliati.
Per quanto riguarda altri files non so nemmeno di cosa si tratti, poiché di SSL non sono molto pratico.

Code:
# openssl x509 -noout -in /etc/apache2/ssl/server.crt -issuer
issuer= /C=IT/ST=ROME/O=Internet Widgits Pty Ltd

"Ovviamente" quando ho fatto i certificati ho inserito dei dati io, non sapendo cos'altro fare.
_________________
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Back to top
View user's profile Send private message
mrfree
Veteran
Veteran


Joined: 15 Mar 2003
Posts: 1303
Location: Europe.Italy.Sulmona

PostPosted: Fri Jan 15, 2010 8:42 am    Post subject: Reply with quote

Oops... ti ho suggerito il comando sbagliato :)

Posta l'output di
Quote:
openssl x509 -noout -in server.crt -subject

oppure direttamente
Quote:
openssl x509 -text -in server.crt

_________________
Please EU, pimp my country!

ICE: /etc/init.d/iptables panic
Back to top
View user's profile Send private message
fbcyborg
Advocate
Advocate


Joined: 16 Oct 2005
Posts: 3056
Location: ROMA

PostPosted: Fri Jan 15, 2010 8:54 am    Post subject: Reply with quote

Code:
# openssl x509 -noout -in /etc/apache2/ssl/server.crt -subject
subject= /C=IT/ST=ROME/O=Internet Widgits Pty Ltd


Code:
# openssl x509 -text -in /etc/apache2/ssl/server.crt
Certificate:                                                         
    Data:                                                             
        Version: 1 (0x0)                                             
        Serial Number:                                               
            a1:65:b2:7b:ae:a4:2c:3f                                   
        Signature Algorithm: sha1WithRSAEncryption                   
        Issuer: C=IT, ST=ROME, O=Internet Widgits Pty Ltd             
        Validity                                                     
            Not Before: Jan 12 13:38:43 2010 GMT                     
            Not After : Jan 10 13:38:43 2020 GMT                     
        Subject: C=IT, ST=ROME, O=Internet Widgits Pty Ltd
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
            RSA Public Key: (1024 bit)
                Modulus (1024 bit):
                    00:a2:09:51:3d:95:ea:aa:bd:47:9a:db:44:e7:2b:
                    71:5d:95:6f:57:32:63:c8:75:b3:24:2c:06:c1:cc:
                    f7:39:ae:fd:27:63:cc:48:35:80:12:32:8c:85:c0:
                    51:45:d7:3a:6f:80:f6:d9:91:83:32:ac:a5:33:f6:
                    79:7f:fb:1a:c6:41:53:d4:78:b7:63:a2:cc:21:27:
                    59:18:58:1c:39:26:3d:b0:fa:53:3b:c6:5d:d0:1d:
                    46:72:7f:16:f9:23:a3:7e:82:71:58:ef:f0:95:e6:
                    6f:ab:25:af:ce:17:f2:dc:15:f3:8c:73:9f:66:54:
                    89:84:51:63:32:31:b1:72:2d
                Exponent: 65537 (0x10001)
    Signature Algorithm: sha1WithRSAEncryption
        0f:e4:b2:0a:1d:63:17:12:12:ef:a5:11:33:d3:02:44:9d:d1:
        76:30:89:52:6a:15:f9:38:a1:b3:6f:0d:48:86:45:b4:5d:68:
        74:c0:42:ba:1c:0a:a0:e2:5b:3d:d7:0a:f2:65:07:06:94:6a:
        3b:35:e6:fc:84:0d:81:e5:ae:f3:c7:1a:e1:87:9d:01:bf:79:
        a3:ea:1c:1f:8d:e3:15:8d:40:da:9d:bc:b1:30:70:a5:4c:6d:
        50:74:b3:2a:aa:5e:62:c1:d8:92:60:28:33:41:28:b1:41:c7:
        ba:45:c3:ce:57:17:f4:5f:ee:1e:45:51:65:88:3b:ad:0f:f7:
        f1:85
-----BEGIN CERTIFICATE-----
MIIB9TCCAV4CCQChZbJ7rqQsPzANBgkqhkiG9w0BAQUFADA/MQswCQYDVQQGEwJJ
VDENMAsGA1UECBMEUk9NRTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkg
THRkMB4XDTEwMDExMjEzMzg0M1oXDTIwMDExMDEzMzg0M1owPzELMAkGA1UEBhMC
SVQxDTALBgNVBAgTBFJPTUUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5
IEx0ZDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAoglRPZXqqr1HmttE5ytx
XZVvVzJjyHWzJCwGwcz3Oa79J2PMSDWAEjKMhcBRRdc6b4D22ZGDMqylM/Z5f/sa
xkFT1Hi3Y6LMISdZGFgcOSY9sPpTO8Zd0B1Gcn8W+SOjfoJxWO/wleZvqyWvzhfy
3BXzjHOfZlSJhFFjMjGxci0CAwEAATANBgkqhkiG9w0BAQUFAAOBgQAP5LIKHWMX
EhLvpREz0wJEndF2MIlSahX5OKGzbw1IhkW0XWh0wEK6HAqg4ls91wryZQcGlGo7
Neb8hA2B5a7zxxrhh50Bv3mj6hwfjeMVjUDanbyxMHClTG1QdLMqql5iwdiSYCgz
QSixQce6RcPOVxf0X+4eRVFliDutD/fxhQ==
-----END CERTIFICATE-----

_________________
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Back to top
View user's profile Send private message
mrfree
Veteran
Veteran


Joined: 15 Mar 2003
Posts: 1303
Location: Europe.Italy.Sulmona

PostPosted: Fri Jan 15, 2010 12:50 pm    Post subject: Reply with quote

Ok... dai uno sguardo più approfondito alla guida per la generazione dei certificati che hai linkato nel tuo primo post ;)
Mi riferisco in particolare alla sezione "Step 2: Generate a CSR (Certificate Signing Request)"
Quote:
One of the prompts will be for “Common Name (e.g., YOUR name)”. It is important that this field be filled in with the fully qualified domain name of the server to be protected by SSL. If the website to be protected will be https://www.yatblog.com, then enter www.yatblog.com at this prompt. If you want to create a so called “wildcard” certificate, which means the same certificate can be used on an unlimited number of subdomains, just enter an asterisk as the hostname, in our example that would be *.yatblog.com.


Nel tuo certificato sembra mancare il Common Name (CN), crea un nuovo certificato facendo caso a questo campo
_________________
Please EU, pimp my country!

ICE: /etc/init.d/iptables panic
Back to top
View user's profile Send private message
fbcyborg
Advocate
Advocate


Joined: 16 Oct 2005
Posts: 3056
Location: ROMA

PostPosted: Fri Jan 15, 2010 2:57 pm    Post subject: Reply with quote

Il problema è che non capisco cosa mettere!

Da locale accedo via https://localhost/websvn
Da remoto (all'interno della stessa rete lan) invice tramite https://192.168.1.100/websvn

Se invece uso una VPN userò un altro IP...

Come faccio a decidere cosa mettere?
_________________
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Back to top
View user's profile Send private message
mrfree
Veteran
Veteran


Joined: 15 Mar 2003
Posts: 1303
Location: Europe.Italy.Sulmona

PostPosted: Sat Jan 16, 2010 3:00 pm    Post subject: Reply with quote

Potresti "giocare" utilizzando il server DNS interno alla tua LAN (se ne hai uno) e/o il file /etc/hosts in modo che a seconda dei casi il tuo PC possa risolvere la stessa URL su IP diversi in base alla tua posizione...

Ad esempio se utilizzi www.fbcyborg.loc come CommonName, aggiungendo nel tuo file /etc/hosts una entry tipo
Code:
192.168.1.100        www.fbcyborg.loc

all'interno della tua LAN non dovresti avere problemi. Per il discorso VPN invece puoi fare in modo che questa entry venga modificata dinamicamente quando non sei nella tua LAN, in modo che 192.168.1.100 vanga sostituito con l'ip corretto (non conosco dettagli sulla tua VPN quindi mi viene difficile darti indicazioni più precise)
_________________
Please EU, pimp my country!

ICE: /etc/init.d/iptables panic
Back to top
View user's profile Send private message
fbcyborg
Advocate
Advocate


Joined: 16 Oct 2005
Posts: 3056
Location: ROMA

PostPosted: Sat Jan 16, 2010 9:24 pm    Post subject: Reply with quote

OK,

non ho un server dns sul mio pc, ed eviterei di installarlo se possibile.
Per quanto riguarda /etc/hosts, quella sì, potrebbe essere una prova.

Per la VPN invece ho una subnet del tipo 192.168.139.0, ma uso anche hamachi che ha tutta una sua classe di IP...

Vediamo un po... :)

Grazie
_________________
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum