| 1 |
/* |
| 2 |
Stubs for SSL support when no SSL library has been configured |
| 3 |
Copyright (C) 2002-2006, Joe Orton <[email protected]> |
| 4 |
|
| 5 |
This library is free software; you can redistribute it and/or |
| 6 |
modify it under the terms of the GNU Library General Public |
| 7 |
License as published by the Free Software Foundation; either |
| 8 |
version 2 of the License, or (at your option) any later version. |
| 9 |
|
| 10 |
This library is distributed in the hope that it will be useful, |
| 11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 |
Library General Public License for more details. |
| 14 |
|
| 15 |
You should have received a copy of the GNU Library General Public |
| 16 |
License along with this library; if not, write to the Free |
| 17 |
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
| 18 |
MA 02111-1307, USA |
| 19 |
|
| 20 |
*/ |
| 21 |
|
| 22 |
#include "config.h" |
| 23 |
|
| 24 |
#include <stdlib.h> /* for NULL */ |
| 25 |
|
| 26 |
#include "ne_ssl.h" |
| 27 |
#include "ne_session.h" |
| 28 |
|
| 29 |
char *ne_ssl_readable_dname(const ne_ssl_dname *dn) |
| 30 |
{ |
| 31 |
return NULL; |
| 32 |
} |
| 33 |
|
| 34 |
ne_ssl_certificate *ne_ssl_cert_read(const char *filename) |
| 35 |
{ |
| 36 |
return NULL; |
| 37 |
} |
| 38 |
|
| 39 |
int ne_ssl_cert_cmp(const ne_ssl_certificate *c1, const ne_ssl_certificate *c2) |
| 40 |
{ |
| 41 |
return 1; |
| 42 |
} |
| 43 |
|
| 44 |
const ne_ssl_certificate *ne_ssl_cert_signedby(const ne_ssl_certificate *cert) |
| 45 |
{ |
| 46 |
return NULL; |
| 47 |
} |
| 48 |
|
| 49 |
const ne_ssl_dname *ne_ssl_cert_issuer(const ne_ssl_certificate *cert) |
| 50 |
{ |
| 51 |
return NULL; |
| 52 |
} |
| 53 |
|
| 54 |
const ne_ssl_dname *ne_ssl_cert_subject(const ne_ssl_certificate *cert) |
| 55 |
{ |
| 56 |
return NULL; |
| 57 |
} |
| 58 |
|
| 59 |
void ne_ssl_cert_free(ne_ssl_certificate *cert) {} |
| 60 |
|
| 61 |
ne_ssl_client_cert *ne_ssl_clicert_read(const char *filename) |
| 62 |
{ |
| 63 |
return NULL; |
| 64 |
} |
| 65 |
|
| 66 |
const ne_ssl_certificate *ne_ssl_clicert_owner(const ne_ssl_client_cert *ccert) |
| 67 |
{ |
| 68 |
return NULL; |
| 69 |
} |
| 70 |
|
| 71 |
int ne_ssl_clicert_encrypted(const ne_ssl_client_cert *ccert) |
| 72 |
{ |
| 73 |
return -1; |
| 74 |
} |
| 75 |
|
| 76 |
int ne_ssl_clicert_decrypt(ne_ssl_client_cert *ccert, const char *password) |
| 77 |
{ |
| 78 |
return -1; |
| 79 |
} |
| 80 |
|
| 81 |
void ne_ssl_clicert_free(ne_ssl_client_cert *ccert) {} |
| 82 |
|
| 83 |
void ne_ssl_trust_default_ca(ne_session *sess) {} |
| 84 |
|
| 85 |
ne_ssl_context *ne_ssl_context_create(int mode) |
| 86 |
{ |
| 87 |
return NULL; |
| 88 |
} |
| 89 |
|
| 90 |
void ne_ssl_context_trustcert(ne_ssl_context *ctx, const ne_ssl_certificate *cert) |
| 91 |
{} |
| 92 |
|
| 93 |
int ne_ssl_context_set_verify(ne_ssl_context *ctx, |
| 94 |
int required, |
| 95 |
const char *ca_names, |
| 96 |
const char *verify_cas) |
| 97 |
{ |
| 98 |
return -1; |
| 99 |
} |
| 100 |
|
| 101 |
void ne_ssl_context_set_flag(ne_ssl_context *ctx, int flag, int value) {} |
| 102 |
|
| 103 |
void ne_ssl_context_destroy(ne_ssl_context *ctx) {} |
| 104 |
|
| 105 |
int ne_ssl_cert_digest(const ne_ssl_certificate *cert, char digest[60]) |
| 106 |
{ |
| 107 |
return -1; |
| 108 |
} |
| 109 |
|
| 110 |
void ne_ssl_cert_validity_time(const ne_ssl_certificate *cert, |
| 111 |
time_t *from, time_t *until) {} |
| 112 |
|
| 113 |
const char *ne_ssl_cert_identity(const ne_ssl_certificate *cert) |
| 114 |
{ |
| 115 |
return NULL; |
| 116 |
} |
| 117 |
|
| 118 |
|
| 119 |
const char *ne_ssl_clicert_name(const ne_ssl_client_cert *ccert) |
| 120 |
{ |
| 121 |
return NULL; |
| 122 |
} |
| 123 |
|
| 124 |
int ne_ssl_dname_cmp(const ne_ssl_dname *dn1, const ne_ssl_dname *dn2) |
| 125 |
{ |
| 126 |
return -1; |
| 127 |
} |
| 128 |
|
| 129 |
int ne_ssl_cert_write(const ne_ssl_certificate *cert, const char *filename) |
| 130 |
{ |
| 131 |
return -1; |
| 132 |
} |
| 133 |
|
| 134 |
char *ne_ssl_cert_export(const ne_ssl_certificate *cert) |
| 135 |
{ |
| 136 |
return NULL; |
| 137 |
} |
| 138 |
|
| 139 |
ne_ssl_certificate *ne_ssl_cert_import(const char *data) |
| 140 |
{ |
| 141 |
return NULL; |
| 142 |
} |
| 143 |
|
| 144 |
void ne_ssl_set_clicert(ne_session *sess, const ne_ssl_client_cert *cc) |
| 145 |
{} |