summaryrefslogtreecommitdiffstats
path: root/debian/perl-framework/t/conf/ssl/ssl.conf.in
blob: 6fadf333b0b7a308d8d8ebb2411b37fbe2b858db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
#test config derived from httpd-2.0/docs/conf/ssl-std.conf -*- text -*-

<IfModule @ssl_module@>
    #base config that can be used by any SSL enabled VirtualHosts
    AddType application/x-x509-ca-cert .crt
    AddType application/x-pkcs7-crl    .crl

    <IfDefine TEST_SSL_SESSCACHE>
       SSLSessionCache      ${SSL_SESSCACHE}
    </IfDefine>
    <IfDefine !TEST_SSL_SESSCACHE>
      SSLSessionCache        none
    </IfDefine>

    <IfVersion < 2.3.4>
    #SSLMutex  file:@ServerRoot@/logs/ssl_mutex
    </IfVersion>
    <IfVersion >= 2.3.4>
    # mutex created automatically
    # config needed only if file-based mutexes are used and
    # default lock file dir is inappropriate
    # Mutex file:/path/to/lockdir ssl-cache
    </IfVersion>

    SSLRandomSeed startup builtin
    SSLRandomSeed connect builtin
    #SSLRandomSeed startup file:/dev/random  512
    #SSLRandomSeed startup file:/dev/urandom 512
    #SSLRandomSeed connect file:/dev/random  512
    #SSLRandomSeed connect file:/dev/urandom 512

    SSLProtocol @sslproto@

    <IfModule mod_log_config.c>
        LogFormat "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %>s %b" ssl
        CustomLog logs/ssl_request_log ssl
    </IfModule>

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

    <IfDefine TEST_SSL_PASSPHRASE_EXEC>
        SSLPassPhraseDialog  exec:@ServerRoot@/conf/ssl/httpd-passphrase.pl
    </IfDefine>
    #else the default is builtin
    <IfDefine !TEST_SSL_PASSPHRASE_EXEC>
        SSLPassPhraseDialog  builtin
    </IfDefine>

    <IfDefine TEST_SSL_DES3_KEY>
        SSLCertificateFile @SSLCA@/asf/certs/server_des3.crt

        SSLCertificateKeyFile @SSLCA@/asf/keys/server_des3.pem

#        SSLCertificateFile @SSLCA@/asf/certs/server_des3_dsa.crt

#        SSLCertificateKeyFile @SSLCA@/asf/keys/server_des3_dsa.pem
    </IfDefine>
    #else the default is an unencrypted key
    <IfDefine !TEST_SSL_DES3_KEY>
        SSLCertificateFile @SSLCA@/asf/certs/server.crt

        SSLCertificateKeyFile @SSLCA@/asf/keys/server.pem

#        SSLCertificateFile @SSLCA@/asf/certs/server_dsa.crt

#        SSLCertificateKeyFile @SSLCA@/asf/keys/server_dsa.pem
    </IfDefine>

    #SSLCertificateChainFile @SSLCA@/asf/certs/cachain.crt

    SSLCACertificateFile @SSLCA@/asf/certs/ca.crt

    SSLCACertificatePath @ServerRoot@/conf/ssl

    SSLCARevocationFile @SSLCA@/asf/crl/ca-bundle.crl
    <IfVersion >= 2.3.15>
        SSLCARevocationCheck chain
    </IfVersion>

    <VirtualHost @ssl_module_name@>
        SSLEngine on

        #t/ssl/verify.t
        Alias /verify @DocumentRoot@

        <Location /verify>
            SSLVerifyClient require
            SSLVerifyDepth  10
        </Location>

        # t/ssl/pha.t
        <Location /require/small>
            SSLVerifyClient require
            SSLVerifyDepth  10

            SSLRenegBufferSize 10
        </Location>
        Alias /require/small      @DocumentRoot@/modules/cgi

        #t/ssl/require.t
        Alias /require/asf        @DocumentRoot@
        Alias /require/snakeoil   @DocumentRoot@
        Alias /require/certext    @DocumentRoot@
        Alias /require/strcmp     @DocumentRoot@
        Alias /require/intcmp     @DocumentRoot@
        Alias /ssl-fakebasicauth  @DocumentRoot@
        Alias /ssl-fakebasicauth2 @DocumentRoot@
        Alias /ssl-cgi            @DocumentRoot@/modules/cgi
        Alias /require-ssl-cgi    @DocumentRoot@/modules/cgi

        Alias /require-aes128-cgi    @DocumentRoot@/modules/cgi
        Alias /require-aes256-cgi    @DocumentRoot@/modules/cgi

        <Location /require/asf>
            SSLVerifyClient require
            SSLVerifyDepth  10
            SSLRequire (%{SSL_CIPHER} !~ m/^(EXP|NULL)-/ \
                        and %{SSL_CLIENT_S_DN_O} eq "ASF" \
                        and %{SSL_CLIENT_S_DN_OU} in \
                             {"httpd-test", "httpd", "modperl"} )
        </Location>

        <Location /require/snakeoil>
            SSLVerifyClient require
            SSLVerifyDepth  10
            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"} )
        </Location>

        <Location /require/certext>
            SSLVerifyClient require
            <IfVersion > 2.3.0>
               SSLRequire "Lemons" in PeerExtList("1.3.6.1.4.1.18060.12.0")
            </IfVersion>
            <IfVersion < 2.3.0>
               <IfVersion > 2.1.6>
                  SSLRequire "Lemons" in OID("1.3.6.1.4.1.18060.12.0")
               </IfVersion>
            </IfVersion>
        </Location>

        <Location /require/strcmp>
            SSLRequire "a" < "b"
            SSLRequire "a" lt "b"
        </Location>

        <Location /require/intcmp>
            SSLRequire 2 < 10
            SSLRequire 2 lt 10
        </Location>

        <Location /ssl-cgi>
            SSLOptions +StdEnvVars
        </Location>

        <Location /require-ssl-cgi>
            SSLOptions +StdEnvVars
            SSLVerifyClient require
            SSLVerifyDepth  10
        </Location>

        <Location /require-aes128-cgi>
            SSLCipherSuite AES128-SHA
        </Location>

        <Location /require-aes256-cgi>
            SSLCipherSuite AES256-SHA
        </Location>

        <IfModule @AUTH_MODULE@>
            <Location /ssl-fakebasicauth>
                SSLVerifyClient      require
                SSLVerifyDepth       5
                SSLOptions           +FakeBasicAuth
                AuthName             "Snake Oil Authentication"
                AuthType             Basic
                AuthUserFile         @SSLCA@/asf/ssl.htpasswd
                require              valid-user
            </Location>
        </IfModule>

        # specific to 2.1
        <IfModule mod_authn_anon.c>
            <IfModule mod_auth_basic.c>
                <Location /ssl-fakebasicauth2>
                    SSLVerifyClient      require
                    SSLOptions           +FakeBasicAuth +StdEnvVars
                    AuthName             "Snake Oil Authentication"
                    AuthType             Basic
                    AuthBasicProvider    anon
                    Anonymous            dummy "*"
                    require              valid-user
                </Location>
            </IfModule>
        </IfModule>

        ##
        ## mod_h2 test config
        ##
        <IfModule h2_module>
            LogLevel h2:debug
        </IfModule>

        <IfModule @CGI_MODULE@>
            <Directory @SERVERROOT@/htdocs/modules/h2>
                Options +ExecCGI
                AddHandler cgi-script .pl

            </Directory>
        </IfModule>
        <Location /modules/h2/hello.pl>
            SSLOptions +StdEnvVars
        </Location>
        <IfModule mod_rewrite.c>
            RewriteEngine on
            RewriteRule ^/modules/h2/latest.tar.gz$ /modules/h2/xxx-1.0.2a.tar.gz [R=302,NC]
        </IfModule>

    </VirtualHost>

    # An SSL vhost which does optional ccert checks at vhost level, to
    # check for CVE CAN-2005-2700.
      
    <VirtualHost ssl_optional_cc>
        SSLEngine on
        
        SSLVerifyClient optional

        Alias /require/any        @DocumentRoot@
        Alias /require/none       @DocumentRoot@

        <Location /require/any>
            SSLVerifyClient require
            SSLVerifyDepth  10
        </Location>
    </VirtualHost>

    # An SSL vhost which can be used to trigger PR 33791

    <VirtualHost ssl_pr33791>
       SSLEngine On

       ErrorDocument 400 /index.html

       <Location />
           SSLVerifyClient require
       </Location>
    </VirtualHost>

    # For t/ssl/ocsp.t --
    <Location /modules/ssl/ocsp>
        SetEnv SSL_CA_ROOT @sslca@/asf
    </Location>
    Alias /modules/ssl/ocsp            @DocumentRoot@/modules/cgi/ocsp.pl

    <VirtualHost ssl_ocsp>
       SSLEngine on

     # SSLOCSPResponderCertificateFile is available from 2.4.26
     <IfVersion >= 2.4.26>
       SSLVerifyClient on

       SSLOCSPEnable on
       SSLOCSPDefaultResponder http://@SERVERNAME@:@PORT@/modules/ssl/ocsp
       SSLOCSPResponderCertificateFile @SSLCA@/asf/certs/server.crt

       # Ignore CRL check results
       SSLCARevocationCheck none
     </IfVersion>
    </VirtualHost>

    # For t/ssl/pr43738.t:
    <IfModule mod_actions.c>
        Action application/x-pf-action /modules/cgi/action.pl
        
        AddType application/x-pf-action .pfa
    </IfModule>

    <Location /modules/ssl/aes128/>
         SSLCipherSuite AES128-SHA
    </Location>

    <Location /modules/ssl/aes256/>
         SSLCipherSuite AES256-SHA
    </Location>

</IfModule>