~ubuntu-branches/ubuntu/wily/dovecot/wily

« back to all changes in this revision

Viewing changes to .pc/CVE-2011-4318.patch/src/login-common/ssl-proxy.c

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2011-12-08 14:34:36 UTC
  • Revision ID: package-import@ubuntu.com-20111208143436-9scnmh9l46vo9opk
Tags: 1:2.0.15-1ubuntu5
* SECURITY UPDATE: Incorrect cert Common Name verification when proxying
  - debian/patches/CVE-2011-4318.patch: correctly validate Common Name
    when a hostname is specified in src/login-common/{login-proxy.c,
    ssl-proxy.*,ssl-proxy-openssl.c}.
  - CVE-2011-4318

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (c) 2002-2011 Dovecot authors, see the included COPYING file */
 
2
 
 
3
#include "lib.h"
 
4
#include "ssl-proxy.h"
 
5
 
 
6
bool ssl_initialized = FALSE;
 
7
 
 
8
#ifndef HAVE_SSL
 
9
 
 
10
/* no SSL support */
 
11
 
 
12
int ssl_proxy_alloc(int fd ATTR_UNUSED, const struct ip_addr *ip ATTR_UNUSED,
 
13
                    const struct login_settings *set ATTR_UNUSED,
 
14
                    struct ssl_proxy **proxy_r ATTR_UNUSED)
 
15
{
 
16
        i_error("Dovecot wasn't built with SSL support");
 
17
        return -1;
 
18
}
 
19
 
 
20
int ssl_proxy_client_alloc(int fd ATTR_UNUSED, struct ip_addr *ip ATTR_UNUSED,
 
21
                           const struct login_settings *set ATTR_UNUSED,
 
22
                           ssl_handshake_callback_t *callback ATTR_UNUSED,
 
23
                           void *context ATTR_UNUSED,
 
24
                           struct ssl_proxy **proxy_r ATTR_UNUSED)
 
25
{
 
26
        i_error("Dovecot wasn't built with SSL support");
 
27
        return -1;
 
28
}
 
29
 
 
30
void ssl_proxy_start(struct ssl_proxy *proxy ATTR_UNUSED)
 
31
{
 
32
}
 
33
 
 
34
void ssl_proxy_set_client(struct ssl_proxy *proxy ATTR_UNUSED,
 
35
                          struct client *client ATTR_UNUSED)
 
36
{
 
37
}
 
38
 
 
39
bool ssl_proxy_has_valid_client_cert(const struct ssl_proxy *proxy ATTR_UNUSED)
 
40
{
 
41
        return FALSE;
 
42
}
 
43
 
 
44
bool ssl_proxy_has_broken_client_cert(struct ssl_proxy *proxy ATTR_UNUSED)
 
45
{
 
46
        return FALSE;
 
47
}
 
48
 
 
49
const char *ssl_proxy_get_peer_name(struct ssl_proxy *proxy ATTR_UNUSED)
 
50
{
 
51
        return NULL;
 
52
}
 
53
 
 
54
bool ssl_proxy_is_handshaked(const struct ssl_proxy *proxy ATTR_UNUSED)
 
55
{
 
56
        return FALSE;
 
57
}
 
58
 
 
59
const char *ssl_proxy_get_last_error(const struct ssl_proxy *proxy ATTR_UNUSED)
 
60
{
 
61
        return NULL;
 
62
}
 
63
 
 
64
const char *ssl_proxy_get_security_string(struct ssl_proxy *proxy ATTR_UNUSED)
 
65
{
 
66
        return "";
 
67
}
 
68
 
 
69
const char *ssl_proxy_get_compression(struct ssl_proxy *proxy ATTR_UNUSED)
 
70
{
 
71
        return NULL;
 
72
}
 
73
 
 
74
void ssl_proxy_free(struct ssl_proxy **proxy ATTR_UNUSED) {}
 
75
 
 
76
unsigned int ssl_proxy_get_count(void)
 
77
{
 
78
        return 0;
 
79
}
 
80
 
 
81
void ssl_proxy_init(void) {}
 
82
void ssl_proxy_deinit(void) {}
 
83
 
 
84
#endif