~ubuntu-branches/ubuntu/feisty/apache2/feisty

« back to all changes in this revision

Viewing changes to modules/ssl/ssl_util_ssl.h

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Barth
  • Date: 2006-12-09 21:05:45 UTC
  • mfrom: (0.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061209210545-h70s0xaqc2v8vqr2
Tags: 2.2.3-3.2
* Non-maintainer upload.
* 043_ajp_connection_reuse: Patch from upstream Bugzilla, fixing a critical
  issue with regard to connection reuse in mod_proxy_ajp.
  Closes: #396265

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Licensed to the Apache Software Foundation (ASF) under one or more
 
2
 * contributor license agreements.  See the NOTICE file distributed with
 
3
 * this work for additional information regarding copyright ownership.
 
4
 * The ASF licenses this file to You under the Apache License, Version 2.0
 
5
 * (the "License"); you may not use this file except in compliance with
 
6
 * the License.  You may obtain a copy of the License at
 
7
 *
 
8
 *     http://www.apache.org/licenses/LICENSE-2.0
 
9
 *
 
10
 * Unless required by applicable law or agreed to in writing, software
 
11
 * distributed under the License is distributed on an "AS IS" BASIS,
 
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
13
 * See the License for the specific language governing permissions and
 
14
 * limitations under the License.
 
15
 */
 
16
 
 
17
/**
 
18
 * @verbatim
 
19
                        _             _
 
20
    _ __ ___   ___   __| |    ___ ___| |  mod_ssl
 
21
   | '_ ` _ \ / _ \ / _` |   / __/ __| |  Apache Interface to OpenSSL
 
22
   | | | | | | (_) | (_| |   \__ \__ \ |
 
23
   |_| |_| |_|\___/ \__,_|___|___/___/_|
 
24
                        |_____|
 
25
   @endverbatim
 
26
 * @file  ssl_util_ssl.h
 
27
 * @brief Additional Utility Functions for OpenSSL
 
28
 *
 
29
 * @defgroup MOD_SSL_UTIL Utilities
 
30
 * @ingroup MOD_SSL
 
31
 * @{
 
32
 */
 
33
 
 
34
#ifndef __SSL_UTIL_SSL_H__
 
35
#define __SSL_UTIL_SSL_H__
 
36
 
 
37
/**
 
38
 * Determine SSL library version number
 
39
 */
 
40
#ifdef OPENSSL_VERSION_NUMBER
 
41
#define SSL_LIBRARY_VERSION OPENSSL_VERSION_NUMBER
 
42
#define SSL_LIBRARY_NAME    "OpenSSL"
 
43
#define SSL_LIBRARY_TEXT    OPENSSL_VERSION_TEXT
 
44
#elif !defined(SSL_LIBRARY_VERSION)
 
45
#define SSL_LIBRARY_VERSION 0x0000
 
46
#define SSL_LIBRARY_NAME    "OtherSSL"
 
47
#define SSL_LIBRARY_TEXT    "OtherSSL 0.0.0 00 XXX 0000"
 
48
#endif
 
49
 
 
50
/**
 
51
 *  Maximum length of a DER encoded session.
 
52
 *  FIXME: There is no define in OpenSSL, but OpenSSL uses 1024*10,
 
53
 *         so this value should be ok. Although we have no warm feeling.
 
54
 */
 
55
#define SSL_SESSION_MAX_DER 1024*10
 
56
 
 
57
/** max length for SSL_SESSION_id2sz */
 
58
#define SSL_SESSION_ID_STRING_LEN \
 
59
    ((SSL_MAX_SSL_SESSION_ID_LENGTH + 1) * 2)
 
60
 
 
61
/**  
 
62
 *  Additional Functions
 
63
 */
 
64
void        SSL_init_app_data2_idx(void);
 
65
void       *SSL_get_app_data2(SSL *);
 
66
void        SSL_set_app_data2(SSL *, void *);
 
67
X509       *SSL_read_X509(char *, X509 **, modssl_read_bio_cb_fn *);
 
68
EVP_PKEY   *SSL_read_PrivateKey(char *, EVP_PKEY **, modssl_read_bio_cb_fn *, void *);
 
69
int         SSL_smart_shutdown(SSL *ssl);
 
70
X509_STORE *SSL_X509_STORE_create(char *, char *);
 
71
int         SSL_X509_STORE_lookup(X509_STORE *, int, X509_NAME *, X509_OBJECT *);
 
72
char       *SSL_make_ciphersuite(apr_pool_t *, SSL *);
 
73
BOOL        SSL_X509_isSGC(X509 *);
 
74
BOOL        SSL_X509_getBC(X509 *, int *, int *);
 
75
BOOL        SSL_X509_getCN(apr_pool_t *, X509 *, char **);
 
76
BOOL        SSL_X509_INFO_load_file(apr_pool_t *, STACK_OF(X509_INFO) *, const char *);
 
77
BOOL        SSL_X509_INFO_load_path(apr_pool_t *, STACK_OF(X509_INFO) *, const char *);
 
78
int         SSL_CTX_use_certificate_chain(SSL_CTX *, char *, int, modssl_read_bio_cb_fn *);
 
79
char       *SSL_SESSION_id2sz(unsigned char *, int, char *, int);
 
80
 
 
81
/** util functions for OpenSSL+sslc compat */
 
82
int modssl_session_get_time(SSL_SESSION *session);
 
83
 
 
84
DH *modssl_dh_configure(unsigned char *p, int plen,
 
85
                        unsigned char *g, int glen);
 
86
 
 
87
#endif /* __SSL_UTIL_SSL_H__ */
 
88
/** @} */
 
89