FAQ..

SSL, HTTP
그리고 Apache 각각이 요청(request) 처리하는 방식 간의 연관성으로 인하여 SSL 적용된 서버의 어떤 특정 보안 문제에 대한 해결 방법이 항상 명확하지는 않다. 장에서는 그러한 전형적인 상황에서 문제를 어떻게 해결할 것인가에 대하여 논의한다.

어떤 문제를 해결하는 가장 첫번째 방법은 일단 시도해 보는 것이긴 하지만 항상 이전에 내용을 이해하려고 노력해야 한다. 어떤 보안 솔루션의 사용에 있어서 제한(restriction) 연관성(coherence) 알지 못한 상태로 사용하는 것만큼 나쁜 것도 없다!

Cipher Suites and Enforced Strong Security

어떻게 하면 SSLv2만을 사용하는 서버를 생성할 있나? [L]

다음은 SSLv2 프로토콜과 cipher만을 사용하는 SSL 서버를 생성하는 방법이다:

httpd.conf

SSLProtocol -all +SSLv2

SSLCipherSuite SSLv2:+HIGH:+MEDIUM:+LOW:+EXP


어떻게
하면 강력한 암호화(strong encryption)만을 허용하는 SSL 서버를 생성할 있나? [L]

다음은 일곱 가지의 가장 강력한 암호화만을 허용하게 한다:

httpd.conf

SSLProtocol all

SSLCipherSuite HIGH:MEDIUM


어떻게
하면 SSL 서버로 하여금 강력한 암호화만을 허용하면서 수출용 브라우저로 하여금 강력한 암호화를 사용할 있게 업그레이드를 허용할 있을까? [L]

이러한 기능(facility) Server Gated Cryptography (SGC)라고 불려지며, mod_ssl 배포판의 README.GlobalID 문서에서 자세한 내용을 있다. 간단히 말하자면 다음과 같다:

Verisign 같은 수출용 브라우저에서 강력한 암호화를 가능하게 해주는 Verisign 같은 CA 증명서(certificate) 서명된 Global ID 서버 증명서를 서버가 가지고 있다. 브라우저는 수출용 암호(export cipher) 가지고 서버에 접속하면 서버는 자신의 Global ID 증명서를 보내고 브라우저는 증명서를 확인(verify) 어떠한 HTTP 통신이 일어나기 전에 cipher suite 갱신한다. 여기서 생기는 질문은 우리가 어떻게 갱신을 허용하여 strong encryption 강제(enforce) 있는가이다. 다르게 말하면 브라우저가 처음부터 strong encryption 가지고 접속하거나 혹은 strong encryption으로 갱신하여야 하는데 수출용 브라우저는 그러한 수출용 cipher 허용되지 않는다는 것이다.

다음에 트릭이 있다:

httpd.conf

# allow all ciphers for the initial handshake,

# so export browsers can upgrade via SGC facility

SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

<Directory /usr/local/apache/htdocs>

# but finally deny all browsers which haven't upgraded

SSLRequire %{SSL_CIPHER_USEKEYSIZE} >= 128

</Directory>


어떻게
하면 SSL 서버로 하여금 일반적인 모든 형식의 cipher 허용하면서 특정 URL로의 접근에 대해서만 strong cipher 요구하게 있나? [L]

분명히 strong variant 대한 cipher들을 제한하는 server-wide SSLCipherSuite 사용할 없다. 하지만 mod_ssl per-directory context에서의 cipher suite 재설정을 허용하며 자동으로 새로운 설정을 만족하기 위한 SSL 파라미터들의 재협상(renegotiation) 강요하게 해준다. 따라서 다음과 같이 설정해 주면 된다:

httpd.conf

# be liberal in general

SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

<Location /strong/area>

# but https://hostname/string/area/ and below requires strong ciphers

SSLCipherSuite HIGH:MEDIUM

</Location>

 

Client Authentication and Access Control

나의 모든 클라이언트들을 알고 있는 경우 어떻게 하면 증명서에 기반하여 클라이언트들을 인증할 있나? (How can I authenticate clients based on certificates when I know all my clients?) [L]

인트라넷과 같이 공동체 내의 모든 사용자를 알고 있는 경우 plain certificate authentication 사용할 있다. 해야 일은 단지 클라이언트들의 증명서를 자신의 CA 증명서인 ca.crt 서명한 증명서를 가지고서 클라이언트를 확인(verify)하는 뿐이다.

httpd.conf

# require a client certificate which has to be directly

# signed by our CA certificate in ca.crt

SSLVerifyClient require

SSLVerifyDepth 1

SSLCACertificateFile conf/ssl.crt/ca.crt


특정
URL 대해서만 증명서를 기반으로 클라이언트를 인증하면서 서버의 다른 부분들에 대해서는 임의의 클라이언트들의 접근을 허용하려면 어떻게 하나? (How can I authenticate my clients for a particular URL based on certificates but still allow arbitrary clients to access the remaining parts of the server?) [L]

이를 위해서는 mod_ssl 제공하는 디렉토리 기반 재설정 기능(per-directory reconfiguration feature) 사용한다:

httpd.conf

SSLVerifyClient none

SSLCACertificateFile conf/ssl.crt/ca.crt

<Location /secure/area>

SSLVerifyClient require

SSLVerifyDepth 1

</Location>


몇몇
URL들에 대해서는 증명서에 기반하여 특정 클라이언트들만을 인증하면서 서버의 나머지 부분들에 대해서는 임의의 클라이언트들로부터의 접근을 허용하고자 하는 경우 어떻게 해야 하나? (How can I authenticate only particular clients for a some URLs based on certificates but still allow arbitrary clients to access the remaining parts of the server?) [L]

중요한 것은 클라이언트 증명서의 다양한 구성요소(ingredient)들을 점검하는 것이다. 보통 이것은 Subject DN(Distinguished Name) 전체 혹은 일부분을 점검하는 것을 의미하며, 이를 위해서 두가지 방법, mod_auth 기반 방법과 SSLRequire 존재한다: 첫번' 방법은 클라이언트가 전체적으로 다른 형식, DN organisation 같은 공통 필드를 가지지 않는 경우 유용하다. 경우 모든 클라이언트들에 대한 패스워드 데이터베이스를 구축하여야 한다. 두번째 방법은 클라이언트들이 DN으로 인코딩되어지는 공통 구조(common hierarchy) 부분인 경우 유용하며, 경우 match 쉽다.

첫번째 방법:

/usr/local/apache/conf/httpd.conf

SSLVerifyClient none

<Directory /usr/local/apache/htdocs/secure/area>

SSLVerifyClient require

SSLVerifyDepth 5

SSLCACertificateFile conf/ssl.crt/ca.crt

SSLCACertificatePath conf/ssl.crt

SSLOptions +FakeBasicAuth

SSLRequireSSL

AuthType Basic

AuthUserFile /usr/local/apache/conf/httpd.passwd

require valid-user

</Directory>


/usr/local/apache/conf/httpd.passwd

/C=DE/L=Munich/O=Snake Oild, Ltd./OU=Staff/CN=Foo:xxj31ZMTZzkVA

/C=US/L=S.F./O=Snake Oild, Ltd./OU=CA/CN=Bar:xxj31ZMTZzkVA

/C=US/L=L.A./O=Snake Oild, Ltd./OU=Dev/CN=Quux:xxj31ZMTZzkVA

 
The second method:

SSLVerifyClient none

<Directory /usr/local/apache/htdocs/secure/area>

SSLVerifyClient require

SSLVerifyDepth 5

SSLCACertificateFile conf/ssl.crt/ca.crt

SSLCACertificatePath conf/ssl.crt

SSLOptions +FakeBasicAuth

SSLRequireSSL

SSLRequire %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." and \
%{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"}

</Directory>




Posted by Golmong
:


Chapter 6 Glossary

Authentication

서버, 클라이언트, 사용자와 같은 네트워크 상의 개체들에 대한 확인하는 . SSL 경우 서버와 클라이언트의 증명서를 확인(verification)하는 과정을 의미한다.

Access Control

네트워크 상의 접근(access) 대한 제한(restriction). Apache에서는 보통 어떤 URL 대한 접근 제한을 의미한다.

Algorithm

어떠한 문제를 해결하기 위해 사용하는 방법으로서, 유한개의 단계(step) 이루어진 모호하지 않는 (formula) 혹은 규칙의 집합. 암호화를 위해 사용되는 알고리즘은 보통 Cipher라고 불린다.

Certificate

서버나 클라이언트와 같은 네트워크 상의 개체(entity)들을 인증(authentication)하기 위해 사용되는 특정한 데이터 레코드로서, 증명서에는 증명서의 소유자에 대한 X.509 information (subject) 증명서에 서명한 Certificate Authority (issuer) 대한 X.509 information 포함되어 있으며, 또한 소유자의 공개키, CA 의해 만들어진 서명이 포함되어 있다. 네트워크 상의 개체들은 CA 증명서를 이용하여 서명들을 확인하게(verify) 된다.

Certification Authority (CA)

네트워크 상의 개체들에 대한 증명서에 서명하는 것을 목적으로 하는 믿을 있는 3(trusted third party)로서 증명서를 인증하는 역할을 한다. 다른 네트워크 개체들은 서명을 체크함으로써 자신에게 증명서가 어떤 CA 의해 인증되었음을 확인할 있다.

Certificate Signing Request (CSR)

서명을 받기 위해 CA에게 제출되어질 아직 서명되지 않은 증명서로서 CA 자신의 CA 증명서의 개인키로 CSR 서명하게 된다. CSR 서명되어지면 실제로 사용할 있는 증명서(real certificate) 된다.

Cipher

데이터 암호화를 위한 알고리즘이나 시스템으로서, DES, IDEA, RC4 등이 있다.

Ciphertext

Plaintext cipher 통하여 나온 암호화된 결과.

Configuration Directive

어떤 프로그램의 행동을 제어하는 설정 명령(configuration command ). Apache 경우 설정 파일의 첫번째 열에 모든 명령어의 이름이 있다.

CONNECT

HTTP 상에서 raw data channel proxying하기 위한 HTTP 명령으로서 SSL 프로토콜과 같은 다른 프로토콜들을 포함하는데(encapsulate) 사용되어질 있다.

Digital Signature

증명서나 어떤 파일에 대한 유효성(validity) 검사하기 위한 암호화된 텍스트 블록. CA 증명서에 들어있는 공개키의 hash 생성하고, 생성된 hash CA 자신의 개인키로 암호화함으로써 서명을 생성하게 된다. 단지 서명을 생성한 CA 공개키만이 서명을 복호화할 있으며, 서명을 복호화함으로써 CA 증명서의 소유자를 인증하였음을 확인하게 된다.

Export-Crippled

미국의 수출관리규정(Export Administration Regulation ? EAR) 따르기 위한 목적으로 암호화의 강도(cryptographic strength) 낮추는 것으로서, 규정이 적용되는 암호화 소프트웨어는 작은 크기의 키만을 사용하도록 제한되어져 있으며, 이로 인하여 Brute Force 공격에 쉽게 깨어질 있는 암호문만을 생성할 있다.

Fully-Qualified Domain-Name (FQDN)

네트워크 상의 개체에 대한 유일한 이름으로서, IP 주소로 변환(resolve) 있는 호스트 명과 도메인 명으로 이루어진다. 예를 들어, www 호스트 명이고, whatever.com 도메인 명이며, www.whatever.com FQDN 된다.

HyperText Transfer Protocol (HTTP)

World Wide Web에서 사용되는 표준 전송 프로토콜.

HTTPS

안전한(secure) HTTP 프로토콜로서 World Wide Web에서 사용되는 표준 암호화 통신 프로토콜. 실제로 HTTPS SSL 상에서 HTTP 구현한 것이다.

Message Digest

메시지로부터 얻어낸 hash로서 전송 중에 메시지의 내용이 변경되지 않았음을 확인하는데 사용된다.

Pass Phrase

개인키 파일을 보호하기 위한 단어(word) 구문(phrase)으로서 허용되지 않은 사용자가 개인키 파일을 암호화하는 것을 막기 위해 사용된다. 보통 암호화를 위해서 비밀키 암호화/복호화를 사용한다.

Plaintext

암호화되지 않은 텍스트.

Private Key

공개키 암호화 시스템에서 자신만이 알고 있는 비밀키로서 자신에게 메시지를 암호화하거나, 자신이 보내는 메시지에 서명하는데 사용된다.

Public Key

공개키 암호화 시스템에서 공개하게 되는 공개키로서, 공개키의 소유자에게 보낼 메시지를 암호화하거나 공개키의 소유자가 생성한 서명을 복호화하는데 사용된다.

Public Key Cryptography

비대칭형 암호화 시스템을 구현한 암호화 방법으로서 하나의 키를 암호화에 사용하고 다른 하나의 키를 복호화에 사용하게 되며, 키들의 쌍을 key pair라고 부른다. 공개키 암호화는 비대칭형 암호화(Asymmetric Cryptography)라고도 불려진다.

Secure Sockets Layer (SSL)

TCP/IP 네트워크 상에서 일반적인 통신 인증과 암호화를 목적으로 Netscape사에 의해 만들어진 프로토콜. SSL 사용하는 가장 일반적인 방법은 SSL 상에서 HTTP 구현하는 HTTPS 사용하는 것이다.

Session

SSL 통신의 context information.

SSLeay

Eric A. Young eay@cryptsoft.com 개발한 SSL/TLS 구현 라이브러리.

Symmetric Cryptography

암호화와 복호화에 동일한 키를 사용하는 암호화.

Transport Layer Security (TLS)

TCP/IP 네트워크 상에서 일반적인 통신 인증과 암호화를 위해 IETF(Internet Engineering Task Force)에서 SSL 후속으로 개발한 프로토콜. TLSv1 SSLv3 거의 동일하다.

Uniform Resource Locator (URL)

World Wide Web 상에서 다양한 자원(resource)들의 위치를 표시하기 위한 방법. 가장 알려진 URL scheme http이며, SSL https 사용한다.

X.509

ITU(International Telecommunication Union) 의해 권장되어진 authentication certificate scheme이며, SSL/TLS 인증에 사용된다.

Posted by Golmong
:


Chapter. 3 Reference

장에서는 mod_ssl에서 사용되는 모든 설정 지시자(configuration directive) 함께 mod_ssl 제공하는 user visible feature들에 대하여 설명하며, 이를 통해 mod_ssl 어떤 특정한 기능이 실제로 어떻게 설정되는가 혹은 활성화되는가를 설명한다. directive Apache 문서에서 표준 Apache directive 설명하는 방식과 유사한 방식으로 기술되어지는데, 여기에는 directive syntax, default, context 등의 요소들이 기술된다.

Mod_ssl에서 사용하는 directive 크게 세가지 분류(class) 나눠진다. 먼저 Global Directive(context server config directive) server config 파일에서 <VirtualHost> 같은 sectioning command 밖에서만 사용될 있다. 번째는 Per-Server Directive(context server config, virtualhost directive)로서 server config 파일에서 <VirtualHost> 섹션의 밖이나 안에서 모두 사용될 있으며, <VirtualHost> 섹션의 밖에서 사용될 때는 메인(Default) 서버에 대한 설정이 된다. 번째는 Per-Directory Directive(context server config, virtual host, directory, .htaccess directive)로서 server config 파일과 per-directory .htaccess 파일의 어느 곳에서든 사용될 있다. 세가지 class들은 서로의 부분 집합이 되는데, per-directory directive per-server global context에서 사용될 있으며, 또한 per-server class directive global context에서 사용될 수도 있다.

다른 Apache SSL 숄류션들에 대한 backward compatibility 위해 mod_ssl 제공하는 부가적인 directive들과 환경 변수들은 Compatibility Chapter 기술되어져 있다.

 

Configuration Directives

SSLPassPhraseDialog

Name

SSLPassPhraseDialog

Description

Type of pass phrase dialog for encrypted private keys

Syntax

SSLPassPhraseDialog type

Default

SSLPassPhraseDialog builtin

Context

server config

Override

Not applicable

Status

Extension

Module

mod_ssl

Compatibility

mod_ssl 2.1

Apache 시동될 SSL 적용된 virtual host 대한 Certificate Private Key 읽어온다. 보안을 위해서 Private Key들은 암호화되어 있으며, 따라서 mod_ssld 관리자에게 암호화된 Private Key 복호화하기 위해서 Pass Phrase 요구한다. Pass Phare 요구하는 방식은 다음의 두가지 방식이 있다.

  • Builtin

Apache 구동할 관리자가 직접 암호화된 Private Key 대한 Pass Phrase 입력할 있는 interactive terminal dialog 보여주며, default 설정이다. SSL 적용할 virtual host 하나 이상 지정될 있기 때문에 dialog 수를 줄이기 위해서 다음과 같은 reuse-scheme 사용된다: 어떤 Private Key 복호화할 때까지 입력되었던 모든 Pass Phrase 시도해서 맞는 Pass Phrase 있으면 Private Key 대한 dialog 실행하지 않으며, 그렇지 않은 경우에만 새로운 Pass Phrase 요구하는 dialog 실행하고 입력받은 Pass Phrase 이후의 Private Key 위해서 기억되게 된다. N개의 암호화된 Private Key 파일에 대하여 N개의 서로 다른 Pass Phrase 사용할 경우 모든 N개의 Pass Phrase 입력하게 되며, 반면에 모든 N개의 Private Key 파일에 대하여 동일한 Pass Phrase 사용하였다면 단지 한번의 Pass Phrase 입력 dialog만이 실행되게 된다.

  • exec:/path/to/program

Apache 시동 시에 호출할 암호화된 Private Key 대한 external program 설정한다. 외부 프로그램은 servername:portnumber 인수로 입력받아서 해당되는 Pass Phrase stdout으로 출력하며, 시스템이 attacker 의하여 침해(compromise)되지 않았음을 확인하기 위해 먼저 security check 실행하게 되며, check 성공했을 때만 Pass Phrase 제공하게 된다.

Security check 하는 방식이나 Pass Phrase 결정하는 방식은 mod_ssl 결정하는 것이 아니며, mod_ssl 단지 interface(Pass Phrase stdout으로 제공하는 실행가능한 프로그램)만을 정의한다.

방식에서도 Reuse 알고리즘이 사용되며, 따라서 동일한 Pass Phrase 대해서는 external program 한번만 호출된다.

Example:

SSLPassPhraseDialog exec:/usr/local/apache/sbin/pp-filter

 

SSLMutex

Name

SSLMutex

Description

Semaphore for internal mutual exclusion of operations

Syntax

SSLMutex type

Default

SSLMutex none

Context

Server config

Override

Not applicable

Status

Extension

Module

Mod_ssl

Compatibility

Mod_ssl 2.1

directive fork되어진 Apache 서버 프로세스 간의 동기화되어 실행되어야 오퍼레이션들의 상호배제(mutual exclusion) 사용되는 SSL 엔진 세마포어(semaphore) 설정한다. 단지 하나의 global mutex만이 유효하기 때문에 directive global server context에서만 사용할 있다.

가능한 Mutext type 다음과 같다:

  • none

Mutext 사용하지 않으며, 기본 설정(default)이다. 그러나 현재 Mutex SSL Session Cache 대한 write access 동기화(Synchronizing)하는데 주로 사용되기 때문에 Session Cache 변경이 드물게 일어나는 경우에만 설정을 사용한다. 따라서 directive default 설정하는 것은 바람직하지 않으며, real Mutex 설정하는 것이 좋다.

  • file:/path/to/mutex

설정은 portable and always provided Mutex variant 지정하며, 물리적인 파일이 Mutext 사용된다. /path/to/mutex 로컬 디스크 파일시스템을 사용해야 하며, NFS AFS 파일시스템에 위치하는 파일을 사용해서는 않된다.

Notice: 내부적으로, Apache 부모 프로세스(parent process) Process ID(PID) PID 유일하게 만들기 위해 자동으로 /path/to/mutext 덧붙여(appended)짐으로써 PID 충돌을 막아준다.

  • sem

설정은 가장 훌륭한(elegant) 방법이지만 가장 non-portable Mutex variant이며, SysV IPC Semaphore (under Unix) Windows Mutex (under Win32) 사용된다. 경우 해당 platform(OS) 설정을 지원하여야만 한다.

Example:

SSLMutex file:/usr/local/apache/logs/ssl_mutex

SSLRandomSeed

Name

SSLRandomSeed

Description

Pseudo Random Number Generator (PRNG) seeding source

Syntax

SSLRandomSeed context source [bytes]

Default

None

Context

Server config

Override

Not applicable

Status

Extension

Module

Mod_ssl

Compatibility

Mod_ssl 2.2

directive 시동할 (context startup 경우) 혹은 새로운 SSL 연결(connection) 이루어질 (context connect 경우) SSLeay Pseudo Random Number Generator (PRNG) seeding 위한 하나 혹은 이상의 seed source 설정한다. PRNG global facility이므로 directive global server context에서만 사용될 있다.

가능한 source variant 다음과 같다:

  • builtin

언제든지 사용 가능한 builtin seeding source로서 경우 실행 (runtime) 최소한의 CPU cycle 소비하며, 아무런 결점(drawback)없이 사용될 있다. PRNG seeding 위해 사용될 있는 source로는 현재 시간, 현재의 process ID, Apache inter-process scoreboard struture로부터 임의로 선택된 1KB extract 등이 있다. 방법의 단점은 실질적으로 그다지 강력하지 못한 소스이며, 시동시(scoreboard 아직 사용가능하지 않은)에는 소스의 유동성(entropy) 바이트 밖에 되지 않는다는 것이다. 따라서 항상(최소한 startup 시에는) 부가적인 seeding source 지정하는 것이 좋다.

  • file:/path/to/source

PRNG seeding 위해 /path/to/source 지정한 외부 파일을 사용한다. Bytes 명시된 경우에는 지정된 byte 수만큼의 파일의 첫번째부터의 바이트가 entropy 생성하는데 사용되며, Bytes 명시되지 않은 경우에는 파일 전체가 entropy 형성한다. 설정은 특히 startup time seeding 사용되며, /dev/random 이나 /dev/urandom device 사용한다(FreeBSD 계열이나 Linux 같은 최근의 대부분의 Unix 시스템에 device들이 들어있다).

  • exec:/path/to/program

PRNG seeding 위한 소스로서 /path/to/program 지정된 실행가능한 외부 프로그램을 사용한다. Bytes 명시하는 경우에는 프로그램의 stdout contents에서 bytes 지정한 수만큼의 byte entropy 형성하는데 사용하며, bytes 명시되지 않은 경우에는 프로그램의 stdout으로 생성된 전체 데이터가 entropy 이루게 된다. 설정은 단지 startup time에만 사용하며, 매우 강력한 seeding 필요로 하는 경우에 사용된다. 설정을 connection context 사용하는 것은 서버의 속도를 매우 저하시키기 때문에 보통 connection context 외부 프로그램을 사용하는 것은 피해야 한다.

Example:

SSLRandomSeed startup builtin

SSLRandomSeed startup file:/dev/random

SSLRandomSeed startup file:/dev/urandom 1024

SSLRandomSeed startup exec:/usr/local/bin/truerand 16

SSLRandomSeed connect builtin

SSLRandomSeed connect file:/dev/random

SSLRandomSeed connect file:/dev/urandom 1024

 

SSLSessionCache

Name

SSLSessionCache

Description

Type of the global/inter-process SSL Session Cache

Syntax

SSLSessionCache type

Default

SSLSessionCache none

Context

server config

Override

Not applicable

Status

Extension

Module

mod_ssl

Compatibility

mod_ssl 2.1

directive global/inter-process SSL Session Cache storage type 지정하며, cache 병렬적인 요청 프로세스(parallel request processing) 속도를 개선해주는 역할을 한다. 동일한 서버 프로세스(HTTP keep-alive 통한) 대한 요청에 대해서 SSLeay SSL session information 로컬에 저장을 한다. 그러나 modern client 이미지나 다른 데이터들을 parallel request 통하여 요청하기 때문에(보통 4개까지의 parallel request), 이러한 요청들은 서로 다른 pre-forked process 의해 처리된다. Inter-process cache 필요없는 session handshake 피할 있게 해준다.

다음과 같은 2가지의 storage type 지원된다:

  • none

Global/inter-process Session Cache 사용하지 않으며, 기본 설정(default)이다. 기능 상의 문제는 없으나, 현저한 속도 저하가 생긴다.

  • dbm:/path/to/datafile

서버 프로세스들에 대한 local SSLeay memory cache 동기화(synchronizing)하기 위해 로컬 디스크에 있는 DBM hashfile 사용한다. 클라이언트의 요청에 대한 현저한 속도 향상이 생기며, 따라서 설정을 사용하는 것이 권장된다.

Example:

SSLSessionCache dbm:/usr/local/apache/logs/ssl_gcache_data

 

SSLSessionCacheTimeout

Name

SSLSessionCacheTimeout

Description

Number of seconds before an SSL session expires in the Session Cache

Syntax

SSLSessionCacheTimeout seconds

Default

SSLSessionCacheTimeout 300

Context

server config, virtual host

Override

Not applicable

Status

Extension

Module

mod_ssl

Compatibility

mod_ssl 2.0

directive global/inter-process SSL Session Cache SSLeay internal memory cache 저장된 정보들에 대한 timeout 초단위로 지정한다. 설정 값은 최저 15초이며 실제로 실행될 서버에서는 보통 300 이상을 지정한다.

Example:

SSLSessionCacheTimeout 600

 

SSLEngine

Name

SSLEngine

Description

SSL Engine Operation Switch

Syntax

SSLEngine on|off

Default

SSLEngine off

Context

Server config, virtual host

Override

Not applicable

Status

Extension

Module

Mod_ssl

Compatibility

Mod_ssl 2.1

directive SSL/TLS 프로토콜 엔진의 사용여부를 지정하며, 보통 <VirtualHost> 섹션 안에 사용되어 해당 virutal host SSL/TLS 사용할 것인가를 지정한다. 기본 설정은 주서버와 모든 virtual host 대하여 SSL/TLS 프로토콜을 사용하지 않는 것이다.

Example:

<VirtualHost _default_:443>

SSLEngine on

...

</VirtualHost>

 

SSLCipherSuite

Name

SSLCipherSuite

Description

Cipher Suite available for negotiation in SSL handshake

Syntax

SSLCipherSuite cipher-spec

Default

SSLCipherSuite

ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP

Context

server config, virtual host, directory, .htaccess

Override

AuthConfig

Status

Extension

Module

mod_ssl

Compatibility

mod_ssl 2.1

directive SSL handshake phrase 단계에서 클라이언트와 협상(negotiation) 있는 Cipher Suite 설정하며, 이를 위해 콜론(: )으로 구분되는 SSLeay cipher specification들로 이루어진 스트링을 directive 값으로 지정한다. directive per-server per-directory context 모두에서 사용될 있다. Per-server context 경우 directive connection 이루어질 표준 SSL handshake 적용되며, per-directory context 경우에는 HTTP request read 되었지만 HTTP response 보내지기 전에 재설정된 Cipher Suite 가지고 SSL renegotiation하게 된다.

Cipher-spec 지정되는 SSL cipher specification 4개의 주속성(major attribute) 가지의 부가적인 작은 속성(extra minor ones)들로 이루어진다:

  • Key Exchange Algorithm : RSA or Diffie-Hellman variants.

  • Authentication Algorithm : RSA, Diffie-Hellman, DSS or none.

  • Cipher/Encryption Algorithm : DES, Triple-DES, RC4, RC2, IDEA or none.

  • MAC Digest Algorithm : MD5, SHA or SHA1.

SSL cipher 또한 export cipher 되거나 혹은 SSLv2 SSLv3/TLSv1 cipher(여기서 TLSv1 SSLv3 동일하다) 중에 하나가 있다. 사용할 cipher 명시하는 방법으로는 모든 cipher 사용하거나, 한번에 한가지 cipher 사용하거나, 혹은 alias 지정하여 cipher 선호도와 사용 순서를 지정할 있다(Table 1 참조).

 

Tag

Description

Key Exchange Algorithm:

KRSA

RSA key exchange

KDHr

Diffie-Hellman key exchange with RSA key

KDHd

Diffie-Hellman key exchange with DSA key

KEDH

Ephemeral (temp.key) Diffie-Hellman key exchange (no cert)

Authentication Algorithm:

ANULL

No authentication

ARSA

RSA authentication

ADSS

DSS authentication

ADH

Diffie-Hellman authentication

Cipher Encoding Algorithm:

ENULL

No encoding

DES

DES encoding

3DES

Triple-DES encoding

RC4

RC4 encoding

RC2

RC2 encoding

IDEA

IDEA encoding

MAC Digest Algorithm:

MD5

MD5 hash function

SHA1

SHA1 hash function

SHA

SHA hash function

Aliases:

SSLv2

all SSL version 2.0 ciphers

SSLv3

all SSL version 3.0 ciphers

EXP

all export ciphers

LOW

all low strength ciphers (no export, single DES)

MEDIUM

all ciphers with 128 bit encryption

HIGH

all ciphers using Triple-DES

RSA

all ciphers using RSA key exchange

DH

all ciphers using Diffie-Hellman key exchange

EDH

all ciphers using Ephemeral Diffie-Hellman key exchange

ADH

all ciphers using Anonymous Diffie-Hellman key exchange

DSS

all ciphers using DSS authentication

NULL

all ciphers using no encryption

Table 1: SSLeay Cipher Specification Tags

사용하고자 하는 cipher 순서를 지정하기 위해서 여러 개의 tag들을 함께 지정할 있으며, 이를 위해 어떤 특정한 cipher들의 그룹을 의미하는 alias(SSLv2, SSLv3, EXP, LOW, MEDIUM, HIGH)들을 사용할 있다. tag들을 가지 접두사(prefix) 연결하여 cipher-spec 이룰 수도 있으며, 가능한 접두사(prefix) 다음과 같다:

  • none: 리스트에 cipher 포함시킨다

  • + : cipher 리스트에 포함시키며 또한 리스트의 현재 위치로 가져다 놓는다

  • - : 리스트로부터 cipher 제거한다(이후에 다시 포함시킬 있다)

  • ! : 리스트로부터 cipher 완전히 제거한다(이후에 다시 포함시킬 없다)

ssleay ciphers ?v 명령어로 모든 cipher-spec string 있다. 기본(default) cipher-spec string ALL:!ADH:RC4+RSA:+HIGN:+MEDIUM:+LOW:+SSLv2:+EXP이며 의미는 다음과 같다.

  1. Authenticate하지 않는 모든 cipher들을 고려(consideration)에서 제거한다. SSL 경우 단지 Anonymous Diffie-Hellman cipher만이 제거된다

  2. RC4 RSA 사용하는 cipher 포함시킨다.

  3. High security cipher, medium security cipher, 그리고 low security cipher 각각 포함시킨다.

  4. 마지막으로 모든 SSLv2 cipher export cipher들을 리스트의 마지막에 포함시키다.

$ ssleay ciphers -v 'ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP'

NULL-SHA SSLv3 Kx=RSA Au=RSA Enc=None Mac=SHA1

NULL-MD5 SSLv3 Kx=RSA Au=RSA Enc=None Mac=MD5

EDH-RSA-DES-CBC3-SHA SSLv3 Kx=DH Au=RSA Enc=3DES(168) Mac=SHA1

... ... ... ... ...

EXP-RC4-MD5 SSLv3 Kx=RSA(512) Au=RSA Enc=RC4(40) Mac=MD5 export

EXP-RC2-CBC-MD5 SSLv2 Kx=RSA(512) Au=RSA Enc=RC2(40) Mac=MD5 export

EXP-RC4-MD5 SSLv2 Kx=RSA(512) Au=RSA Enc=RC4(40) Mac=MD5 export

Table 2 SSL에서 사용되는 RSA DH cipher 대한 전체 리스트이다.

Example:

SSLCipherSuite RSA:!EXP:!NULL:+HIGH:+MEDIUM:-LOW

Cipher-Tag

Protocol

Key Ex.

Auth.

Enc.

MAC

Type

RSA Ciphers:

DES-CBC3-SHA

SSLv3

RSA

RSA

3DES(168)

SHA1

DES-CBC3-MD5

SSLv2

RSA

RSA

3DES(168)

MD5

IDEA-CBC-SHA

SSLv3

RSA

RSA

IDEA(128)

SHA1

RC4-SHA

SSLv3

RSA

RSA

RC4(128)

SHA1

RC4-MD5

SSLv3

RSA

RSA

RC4(128)

MD5

IDEA-CBC-MD5

SSLv2

RSA

RSA

IDEA(128)

MD5

RC2-CBC-MD5

SSLv2

RSA

RSA

RC2(128)

MD5

RC4-MD5

SSLv2

RSA

RSA

RC4(128)

MD5

DES-CBC-SHA

SSLv3

RSA

RSA

DES(56)

SHA1

RC4-64-MD5

SSLv2

RSA

RSA

RC4(64)

MD5

DES-CBC-MD5

SSLv2

RSA

RSA

DES(56)

MD5

EXP-DES-CBC-SHA

SSLv3

RSA(512)

RSA

DES(40)

SHA1

export

EXP-RC2-CBC-MD5

SSLv3

RSA(512)

RSA

RC2(40)

MD5

export

EXP-RC4-MD5

SSLv3

RSA(512)

RSA

RC4(40)

MD5

export

EXP-RC2-CBC-MD5

SSLv2

RSA(512)

RSA

RC2(40)

MD5

export

EXP-RC4-MD5

SSLv2

RSA(512)

RSA

RC4(40)

MD5

export

NULL-SHA

SSLv3

RSA

RSA

None

SHA1

NULL-MD5

SSLv3

RSA

RSA

None

MD5

Diffie-Hellman Ciphers:

ADH-DES-CBC3-SHA

SSLv3

DH

None

3DES(168)

SHA1

ADH-DES-CBC-SHA

SSLv3

DH

None

DES(56)

SHA1

ADH-RC4-MD5

SSLv3

DH

None

RC4(128)

MD5

EDH-RSA-DES-CBC3-SHA

SSLv3

DH

RSA

3DES(168)

SHA1

EDH-DSS-DES-CBC3-SHA

SSLv3

DH

DSS

3DES(168)

SHA1

EDH-RSA-DES-CBC-SHA

SSLv3

DH

RSA

DES(56)

SHA1

EDH-DSS-DES-CBC-SHA

SSLv3

DH

DSS

DES(56)

SHA1

EXP-EDH-RSA-DES-CBC-SHA

SSLv3

DH(512)

RSA

DES(40)

SHA1

Export

EXP-EDH-DSS-DES-CBC-SHA

SSLv3

DH(512)

DSS

DES(40)

SHA1

Export

EXP-ADH-DES-CBC-SHA

SSLv3

DH(512)

None

DES(40)

SHA1

Export

EXP-ADH-RC4-MD5

SSLv3

DH(512)

None

RC4(40)

MD5

export

Table 2: Particular SSL Ciphers

 

SSLCertificateFile

Name

SSLCertificateFile

Description

Server PEM-encoded X.509 Certificate file

Syntax

SSLCertificateFile filename

Default

None

Context

server config, virtual host

Override

Not applicable

Status

Extension

Module

mod_ssl

Compatibility

mod_ssl 2.0

서버에 대한 PEM-encoding되어진 증명서(Certificate) 파일을 지정하며, 부가적으로(optionally) 증명서에 대응하는 RSA 개인키를 지정한다(같은 파일에 개인키가 포함되어 있는 경우). 만약 증명서에 포함되어 있는 개인키가 암호화되어져 있는 경우 startup 시에 Pass Phrase 입력받는 dialog 실행된다.

Example:

SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt

 

SSLCertificateKeyFile

Name

SSLCertificateKeyFile

Description

Server PEM-encoded RSA Private Key file

Syntax

SSLCertificateKeyFile filename

Default

None

Context

server config, virtual host

Override

Not applicable

Status

Extension

Module

mod_ssl

Compatibility

mod_ssl 2.0

서버에 대한 PEM-encoding되어진 개인키를 지정한다. 개인키가 SSLCertificateFile directive에서 지정한 증명서에 포함되어져 있지 않은 경우 따로 개인키를 저장하고 있는 파일을 지정하기 위해 부가적인 directive 사용하게 된다. 만약 SSLCertificateFile directive 사용되고 증명서 파일에 개인키도 포함되어 있는 경우에는 directive 사용할 필요가 없다. 그러나 증명서에 개인키를 포함하는 것은 실질적인 면에서 권장되지 않으며, 증명서와 개인키를 따로 분리해서 저장하는 것이 좋다. 만약 지정된 개인키가 암호화되어져 있다면 startup 시에 역시 Pass Phrase 물어보는 dialog 실행되게 된다.

Example:

SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key

 

SSLCACertificatePath

Name

SSLCACertificatePath

Description

Directory of PEM-encoded CA Certificates for Client Auth.

Syntax

SSLCACertificatePath directory

Default

None

Context

server config, virtual host

Override

Not applicable

Status

Extension

Module

mod_ssl

Compatibility

mod_ssl 2.0

Certificate Authority(CA) 증명서가 위치한 디렉토리를 지정하며, CA 증명서는 Client Authentication 클라이언트의 증명서를 확인(verify)하기 위해 사용된다.

디렉토리에 있는 파일들은 PEM-encoding되어져야 하며, hash filename 통하여 접근되어진다. 따라서 증명서 파일을 위치에 두어야 하는 것은 아니다. 경우 hash-value.N이라는 이름을 가지는 심볼릭 링크를 생성해야 하며, 항상 디렉토리가 적절한 심볼릭 링크를 가지고 있는가를 확인해야 한다. 이를 위해서는 mod_ssl 포함되어 있는 Makefile 사용한다.

Example:

SSLCACertificatePath /usr/local/apache/conf/ssl.crt/

 

SSLCACertificateFile

Name

SSLCACertificateFile

Description

File of concatenated PEM-encoded CA Certificates for Client Auth.

Syntax

SSLCACertificateFile filename

Default

None

Context

server config, virtual host

Override

Not applicable

Status

Extension

Module

mod_ssl

Compatibility

mod_ssl 2.0

directive 설정하고자 하는 모든 CA들의 증명서들을 모아둘 있는 all-in-one 파일을 지정하며, 증명서들은 Client Authentication 사용된다. 실제로 파일은 PEM-encoding되어 있는 여러 개의 증명서 파일들을 선호도(preference) 따라 연달아 덧붙여둔 것이다.

Example:

SSLCACertificateFile /usr/local/apache/conf/ssl.crt/ca-bundle-client.crt

 

SSLVerifyClient

Name

SSLVerifyClient

Description

Type of Client Certificate verification

Syntax

SSLVerifyClient level

Default

SSLVerifyClient none

Context

server config, virtual host, directory, .htaccess

Override

AuthConfig

Status

Extension

Module

mod_ssl

Compatibility

mod_ssl 2.0

Client Authentication 과정에서 수행할 증명서확인수준(Certificate Verification Level) 지정한다. directive per-server per-directory context 모두에서 사용되어질 있다. per-server context 사용되는 경우 connection 이루어질 표준 SSL handshake에서 사용되는 client authentication 적용되며, per-directory context에서 사용되는 경우 HTTP request read되어졌지만 HTTP response 보내지기 전에 재설정된(reconfigured) client verification level 가지고 재협상(renegotiation)하게 된다.

지정할 있는 level 다음과 같다:

  • none : no client Certificate is required at all

  • optional : the client may present a valid Certificate

  • require : the client has to present a valid Certificate

  • optional_no_ca : the client may present a valid Certificate but has not to be (successfully) verifyable.

4가지 level 모두가 모든 브라우져에서 동작하지는 않으며, optional_no_ca level 경우 실질적으로 인증의 개념과는 맞지 않기 때문에(SSL 테스트를 위한 목적으로나 사용될 있다) 실제로는 none require level만이 의미가 있다.

Example:

SSLVerifyClient require

 

SSLVerifyDepth

Name

SSLVerifyDepth

Description

Maximum depth of CA Certificates in Client Certificate verification

Syntax

SSLVerifyDepth number

Default

SSLVerifyDepth 1

Context

server config, virtual host, directory, .htaccess

Override

AuthConfig

Status

Extension

Module

mod_ssl

Compatibility

mod_ssl 2.0

directive 클라이언트가 유효한 증명서를 가지고 있지 않다고 결정하기 전에 얼마나 깊게 클라이언트를 verify 것인가를 지정한다. directive per-server per-directory context 모두에서 사용되어질 있다. per-server context 사용되는 경우 connection 이루어질 표준 SSL handshake에서 사용되는 client authentication 프로세스에 적용되며, per-directory context에서 사용되는 경우 HTTP request read되어졌지만 HTTP response 보내지기 전에 재설정된(reconfigured) client verification level 가지고 SSL 재협상(renegotiation) 하게 된다.

실질적으로 Depth 증명서에 서명한 바로 상위의 발행자(intermediate certificate issuer) 최대 개수, 클라이언트의 증명서에 서명한 CA 상위 CA들을 찾아갈 최대한 개의 CA 찾아갈 것인가를 의미한다. Depth 0으로 설정하는 것은 self-signed client certificate만을 허용한다는 의미이며, default depth 1 self-signed client certificate이거나 서버가 직접 알고 있는 CA(SSLCACertificatePaht 있는 CA certificate) 서명한 client certificate만을 허용한다는 의미이다.

Example:

SSLVerifyDepth 10

 

SSLLog

Name

SSLLog

Description

Where to write the dedicated SSL engine logfile

Syntax

SSLLog filename

Default

None

Context

Server config, virtual host

Override

Not applicable

Status

Extension

Module

mod_ssl

Compatibility

mod_ssl 2.1

SSL 프로토콜 엔진의 로그만을 기록할(dedicated) 로그 파일의 이름을 지정한다. 에러에 대한 메시지는 일반적인 Apache 에러로그 파일(ErrorLog directive 지정된 파일)에도 기록된다. 로그파일은 symlink attack 사용될 없는 (root만이 write 있는 ) 두어야 한다. 파일 이름이 슬래쉬(/) 시작하지 않으면 Server Root 대한 상대 경로로 인식되며, 파일 이름이 bar(|) 시작하는 경우에는 로그를 받아들이는 실행가능한 프로그램에 대한 경로로 인식된다. directive 하나의 virtual host config에서 한번만이 사용될 있다.

Example:

SSLLog /usr/local/apache/logs/ssl_engine_log

 

SSLLogLevel

Name

SSLLogLevel

Description

Logging level for the dedicated SSL engine logfile

Syntax

SSLLogLevel level

Default

SSLLogLevel none

Context

server config, virtual host

Override

Not applicable

Status

Extension

Module

mod_ssl

Compatibility

mod_ssl 2.1

directive SSL 프로토콜 엔진의 로그파일에 기록할 얼마나 자세하게 기록할 것인가를 지정한다. 지정할 있는 level 다음과 같다(아래로 갈수록 고수준의 level이며, 고수준의 level 저수준의 level 포함한다):

  • none

SSL 전용 로그파일에는 아무것도 남기지 않으며, 단지 에러에 관련된 메시지만이 Apache 에러 로그파일에 기록된다.

  • error

processing 멈추는 것과 같은 치명적인 상황에 대한 에러 메시지만을 기록하며, 메시지들은 Apache 에러 로그파일에도 기록된다.

  • warn

치명적이지 않은 문제에 대한 warning message까지 기록한다.

  • info

중요한 processing step 대한 informational message까지 기록한다.

  • trace

Minor processing step 대한 informational message까지 기록한다.

  • debug

Development low-level I/O information 위한 debugging message까지 기록한다.

Example:

SSLLogLevel warn

 

SSLOptions

Name

SSLOptions

Description

Configure various SSL engine run-time options

Syntax

SSLOptions [+-]option ...

Default

None

Context

server config, virtual host, directory, .htaccess

Override

Options

Status

Extension

Module

mod_ssl

Compatibility

mod_ssl 2.1

 

directive per-directory 수준에서의 다양한 run-time 옵션들을 조정한다. 여러 개의 SSLOption들이 하나의 directory 적용되는 경우 가장 specific 하나가 선택되어지며, 옵션들은 merge되지 않는다. 그러나 만약 SSLOptions directive 모든 옵션들이 plus(+) minus(-) 기호로 연결되어 있는 경우에는 모든 옵션들이 merge되어진다. +기호로 연결된 옵션들은 현재의 옵션에 포함되어지며, - 기호로 연결된 옵션들은 현재의 옵션으로부터 제외되어진다.

The available options are:

  • CompatEnvVars

다른 Apache SSL solution과의 backwardcompatibility 위한 부가적인 CGI/SSI 환경 변수들이 생성된다. 실제로 생성되어질 변수들에 대한 자세한 설명은 Compatibility 부분을 참조한다.

  • ExportCertData

두개의 부가적인 CGI/SSI 환경 변수, SSL_CLIENT_CERT SSL_SERVER_CERT 생성한다. 두개의 변수는 각각 현재의 HTTPS 연결(connection) 대한 클라이언트와 서버의 PEM-encoded X.509 Certificate 포함하게 되며, 고수준의 Certificate checking 위하여 CGI 스크립트에 의해 사용되어질 있다.

  • FakeBasicAuth

옵션이 사용되면 클라이언트 X.509 Certificate Subject DN(Distinguished Name) HPPT Basic Authentication username으로 변환되어지며, 이것은 표준 Apache 인증(authentication) 접근 제어(access control) 사용될 있음을 의미한다. user name Client X.509 Certificate Subject(이것은 SSLeay ssleay x509 ?noout ?subject ?in certificate.crt 명령을 실행할 얻어진다) 되며, 패스워드는 사용자로부터 얻어지는 것이 아니며 모든 user name 대한 패스워드는 password 단어를 암호화한 결과인 xxj31ZMTZzkVA 된다.

Example:

SSLOptions +FakeBasicAuth -CompatEnvVars

 

SSLRequireSSL

Name

SSLRequireSSL

Description

Deny access when SSL is not used for the HTTP request

Syntax

SSLRequireSSL

Default

None

Context

directory, .htaccess

Override

AuthConfig

Status

Extension

Module

mod_ssl

Compatibility

mod_ssl 2.0

directive 명시되면 현재의 연결이 SSL 위에서 이루어진 HTTP(, HTTPS) 아닌 경우 접근을 허용하지 않는다. directive SSL 적용할 virtual host 보호되어야 필요가 있는 디렉토리에 대한 설정 등에 매우 유용하며, directive 있으면 SSL 사용하지 않은 모든 요청(request)들은 거부되어진다.

Example:

SSLRequireSSL

 

SSLRequire

Name

SSLRequire

Description

Allow access only when an arbitrarily complex boolean expression is true

Syntax

SSLRequire expression

Default

None

Context

directory, .htaccess

Override

AuthConfig

Status

Extension

Module

mod_ssl

Compatibility

mod_ssl 2.1

directive 접근이 허용되기 위해 충족되어야 요구사항(access requirement) 지정하며, 요구 사항은 임의의 boolean expression들의 조합이 있다.

Boolean expression 다음의 문법(BNF grammar notation 따른 문법) 따라야 한다:

expr ::= "true" | "false"

| "!" expr

| expr "&&" expr

| expr "||" expr

| "(" expr ")"

| comp

comp ::= word "==" word | word "eq" word

| word "!=" word | word "ne" word

| word "<" word | word "lt" word

| word "<=" word | word "le" word

| word ">" word | word "gt" word

| word ">=" word | word "ge" word

| word "in" "{" wordlist "}"

| word "=~" regex

| word "!~" regex

wordlist ::= word

| wordlist "," word

word ::= digit

| cstring

| variable

| function

digit ::= [0-9]+

cstring ::= "..."

variable ::= "%{" varname "}"

function ::= funcname "(" funcargs ")"

여기서 varname Table 3 있는 어떠한 변수도 사용될 있으며, funcname에는 다음의 함수들이 가능하다:

  • file(filename)

함수는 filename 가리키는 하나의 문자열 인수를 받아서 파일의 content 확장된다. 함수는 파일의 content regular expression 대치시키는데 사용된다.

Expression 먼저 내부적으로 machine representation으로 parsing되며, 두번째 단계로서 evaluate되어진다. Global Per-Server context에서는 expression startup time parsing runtime에서만 machine representation 실행되어진다. Per-Directory context 경우에는 이와 다른데, 경우에는 expression 모든 request마다 parsing되고 곧바로 실행되어진다.

Example:

SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)-/ \

and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \

and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \

and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \

and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \

or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/

Table 3: Available Variables for SSLRequire

 

Additional Features

Environment Variables

Mod_ssl 다양한 SSL 정보를 부가적인 환경 변수들을 통해 제공하며, mod_ssl 생성하는 변수들은 Table 4 정리되어 있다. Backward compatibility 위해서 정보들은 다른 이름으로 제공될 수도 있으며, compatibility 변수들에 대한 자세한 내용은 Compatibility 부분을 참조한다.

Variable Name:

Value Type

Description:

HTTPS

flag

HTTPS is being used.

SSL_PROTOCOL

string

The SSL protocol version (SSLv2, SSLv3, TLSv1)

SSL_CIPHER

string

The cipher specification name

SSL_CIPHER_USEKEYSIZE

number

Number of cipher bits (actually used)

SSL_CIPHER_ALGKEYSIZE

number

Number of cipher bits (possible)

SSL_VERSION_INTERFACE

string

The mod_ssl program version

SSL_VERSION_LIBRARY

string

string The SSLeay program version

SSL_CLIENT_M_VERSION

string

string The version of the client certificate

SSL_CLIENT_M_SERIAL

string

The serial of the client certificate

SSL_CLIENT_S_DN

string

Subject DN in client's certificate

SSL_CLIENT_S_DN_x509

string

Component of client's Subject DN

SSL_CLIENT_I_DN

string

Issuer DN of client's certificate

SSL_CLIENT_I_DN_x509

string

Component of client's Issuer DN

SSL_CLIENT_V_START

string

Validity of client's certificate (start time)

SSL_CLIENT_V_END

string

Validity of client's certificate (end time)

SSL_CLIENT_A_SIG

string

Algorithm used for the signature of client's certificate

SSL_CLIENT_A_KEY

string

Algorithm used for the public key of client's certificate

SSL_SERVER_M_VERSION

string

The version of the server certificate

SSL_SERVER_M_SERIAL

string

The serial of the server certificate

SSL_SERVER_S_DN

string

Subject DN in server's certificate

SSL_SERVER_S_DN_x509

string

Component of server's Subject DN

SSL_SERVER_I_DN

string

Issuer DN of server's certificate

SSL_SERVER_I_DN_x509

string

Component of server's Issuer DN

SSL_SERVER_V_START

string

Validity of server's certificate (start time)

SSL_SERVER_V_END

string

Validity of server's certificate (end time)

SSL_SERVER_A_SIG

string

Algorithm used for the signature of server's certificate

SSL_SERVER_A_KEY

string

Algorithm used for the public key of server's certificate

[ where x509 is a component of a X.509 DN: C, SP, L, O, OU, CN, Email ]

Table 4: SSI/CGI Environment Variables

 

Custom Log Formats

Mod_ssl Apache 적용되어지면 Custom Log Format 위한 부가적인 함수들이 존재하게 된다. 예를 들면 %{varname}x eXtension format function 어떤 모듈이 제공하는 변수(특히 Table 4 나열된 mod_ssl 제공하는 변수) 확장(extend)하는데 사용된다. 또한 Backward compatibility 위해 %{name}c cryptography format function 제공되며, 함수에 대한 정보는 Compatibility 부분을 참조한다.

Example:

CustomLog logs/ssl_request_log \

"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

Posted by Golmong
: