Ubuntu에 Apache를 설치하고 GNUTLS 모듈을 설치했는데 모든 것이 잘 작동했습니다.
root@ilnwad15:~# apache2 -v
Server version: Apache/2.2.22 (Ubuntu)
Server built: Jul 12 2013 13:37:15
이제 포트 1443에서 클라이언트 인증서의 CA가 내 서버의 CA가 아닌 경우 차단됩니다.
이것이 /etc/apache2/apache2.conf에서 구성한 방법입니다.
Listen *:443
Listen *:1443
<VirtualHost *:443>
GnuTLSEnable on
GnuTLSKeyFile /etc/apache2/certs/ilnwad15.tlv.sap.corp.key
GnuTLSCertificateFile /etc/apache2/certs/ilnwad15.tlv.sap.corp.crt
DocumentRoot /disk2/var/www/html
GnuTLSPriorities EXPORT
ServerName ilnwad15
</VirtualHost>
<VirtualHost *:1443>
GnuTLSEnable on
GnuTLSKeyFile /etc/apache2/certs/ilnwad15.tlv.sap.corp.key
GnuTLSCertificateFile /etc/apache2/certs/ilnwad15.tlv.sap.corp.crt
GnuTLSPriorities EXPORT
GnuTLSClientCAFile /etc/apache2/certs/ca.pem
GNUTLSClientVerify require
DocumentRoot /disk2/var/www/html
ServerName ilnwad15
</VirtualHost>
이제 인증서 없이 요청을 보낼 때 내부 오류가 발생합니다.
[root@ilnwadv56 ~]# wget --save-headers --no-check-certificate HTTPs://ilnwad15.tlv.sap.corp:1443
--2013-12-18 17:23:01-- https://ilnwad15.tlv.sap.corp:1443/
Resolving ilnwadv62... 172.16.162.21
Connecting to ilnwadv62|172.16.162.21|:18080... connected.
WARNING: cannot verify ilnwad15.tlv.sap.corp's certificate, issued by `/C=IL/L=Raanana/O=SAP/OU=AccAD/CN=Dummy device':
Unable to locally verify the issuer's authority.
WARNING: certificate common name `dummy.service.com' doesn't match requested host name `ilnwad15.tlv.sap.corp'.
Proxy request sent, awaiting response... 500 Server Error
2013-12-18 17:23:01 ERROR 500: Server Error.
그러나 요청에 해당 CA가 서버 CA와 일치하지 않는다는 인증서가 있는 경우 200 OK를 받고 Internet Explorer
403 Forbidden은 받지 않습니다. 그렇게 할 때 wget
나는failed: Service Unavailable to establish SSL connection.
[root@ilnwadv56 ~]# wget --save-headers --no-check-certificate --certificate=/sapmnt/accad/other/client.crt --private-key=/sapmnt/accad/other/client.key HTTPs://ilnwad15.tlv.sap.corp:443
--2013-12-18 17:46:17-- https://ilnwad15.tlv.sap.corp/
Resolving ilnwadv62... 172.16.162.21
Connecting to ilnwadv62|172.16.162.21|:18080... connected.
Proxy tunneling failed: Service UnavailableUnable to establish SSL connection.
내 실수가 어디에 있는지 아는 사람이 있나요? 미리 감사드립니다.
답변1
좋습니다. 우선 도움을 주신 모든 분들께 감사드립니다(특히 @MadHatter). 문제는 프록시를 사용했기 때문에 프록시를 사용해야 했고 unset https_proxy
문제가 해결되었다는 것입니다.
지금은 올바르게 작동합니다. 더미 인증서를 보내는 경우(를 통해 인증서를 제공하지 않음 wget
)
wget --save-headers --no-check-certificate HTTPS://ilnwad15.tlv.sap.corp:1443
--2013-12-22 10:37:02-- https://ilnwad15.tlv.sap.corp:1443/
Resolving ilnwad15.tlv.sap.corp... 172.16.60.21
Connecting to ilnwad15.tlv.sap.corp|172.16.60.21|:1443... connected.
OpenSSL: error:1409442F:SSL routines:SSL3_READ_BYTES:tlsv1 alert insufficient security
Unable to establish SSL connection.
올바른 인증서를 제공할 때.
wget --save-headers --certificate=/sapmnt/accad/other/ilnwad15.tlv.sap.corp.crt --private-key=/sapmnt/accad/other/ilnwad15.tlv.sap.corp.key --no-check-certificate HTTPS://ilnwad15.tlv.sap.corp:1443
--2013-12-22 10:33:59-- https://ilnwad15.tlv.sap.corp:1443/
Resolving ilnwad15.tlv.sap.corp... 172.16.60.21
Connecting to ilnwad15.tlv.sap.corp|172.16.60.21|:1443... connected.
WARNING: cannot verify ilnwad15.tlv.sap.corp's certificate, issued by /C=IL/ST=Central District/L=Raanana/O=SAP AG/OU=AccAD/CN=AccAD CA/[email protected]:
Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: 4598 (4.5K) [text/html]
Saving to: `index.html'
100%[======================================>] 4,598 --.-K/s in 0s
2013-12-22 10:33:59 (38.5 MB/s) - `index.html' saved [4598/4598]
감사해요! :디