1/* 2 * Copyright (c) 2008-2010 Kungliga Tekniska Högskolan 3 * (Royal Institute of Technology, Stockholm, Sweden). 4 * All rights reserved. 5 * 6 * Portions Copyright (c) 2008-2010 Apple Inc. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: 11 * 12 * 1. Redistributions of source code must retain the above copyright 13 * notice, this list of conditions and the following disclaimer. 14 * 15 * 2. Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in the 17 * documentation and/or other materials provided with the distribution. 18 * 19 * 3. Neither the name of the Institute nor the names of its contributors 20 * may be used to endorse or promote products derived from this software 21 * without specific prior written permission. 22 * 23 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 */ 35 36#define MIT_KRB5_DEPRECATED 1 37 38#include "heim.h" 39#include "mit-krb5.h" 40#include <string.h> 41#include <errno.h> 42#include <syslog.h> 43 44mit_krb5_error_code KRB5_CALLCONV 45krb5_auth_con_setaddrs(mit_krb5_context context, 46 mit_krb5_auth_context ac, 47 mit_krb5_address *caddr, 48 mit_krb5_address *saddr) 49{ 50 LOG_ENTRY(); 51 return 0; 52} 53 54mit_krb5_error_code KRB5_CALLCONV 55krb5_auth_con_getaddrs(mit_krb5_context context, 56 mit_krb5_auth_context ac, 57 mit_krb5_address **caddr, 58 mit_krb5_address **saddr) 59{ 60 LOG_ENTRY(); 61 *caddr = NULL; 62 *saddr = NULL; 63 return 0; 64} 65 66 67mit_krb5_error_code KRB5_CALLCONV 68krb5_auth_con_setports(mit_krb5_context context, 69 mit_krb5_auth_context ac, 70 mit_krb5_address *caddr, 71 mit_krb5_address *saddr) 72{ 73 LOG_ENTRY(); 74 return 0; 75} 76 77mit_krb5_error_code KRB5_CALLCONV 78krb5_auth_con_getkey(mit_krb5_context context, 79 mit_krb5_auth_context ac, 80 mit_krb5_keyblock **keyblock) 81{ 82 LOG_ENTRY(); 83 return 0; 84} 85 86mit_krb5_error_code KRB5_CALLCONV 87krb5_auth_con_setrcache(mit_krb5_context context, 88 mit_krb5_auth_context ac, 89 mit_krb5_rcache rcaceh) 90{ 91 LOG_ENTRY(); 92 return 0; 93} 94 95mit_krb5_error_code KRB5_CALLCONV 96krb5_auth_con_getrcache(mit_krb5_context context, 97 mit_krb5_auth_context ac, 98 mit_krb5_rcache *rcache) 99{ 100 LOG_ENTRY(); 101 *rcache = NULL; 102 return 0; 103} 104 105mit_krb5_error_code KRB5_CALLCONV 106krb5_auth_con_getauthenticator(mit_krb5_context context, 107 mit_krb5_auth_context ac, 108 mit_krb5_authenticator **auth) 109{ 110 LOG_ENTRY(); 111 *auth = NULL; 112 return 0; 113} 114 115mit_krb5_error_code KRB5_CALLCONV 116krb5_auth_con_getlocalsubkey(mit_krb5_context context, 117 mit_krb5_auth_context ac, 118 mit_krb5_keyblock **key) 119{ 120 LOG_ENTRY(); 121 krb5_keyblock *hkey = NULL; 122 krb5_error_code ret; 123 124 *key = NULL; 125 126 ret = heim_krb5_auth_con_getlocalsubkey(HC(context), 127 (krb5_auth_context)ac, 128 &hkey); 129 if (ret) 130 return ret; 131 if (hkey) { 132 *key = mshim_malloc(sizeof(**key)); 133 mshim_hkeyblock2mkeyblock(hkey, *key); 134 heim_krb5_free_keyblock(HC(context), hkey); 135 } 136 return 0; 137} 138 139mit_krb5_error_code KRB5_CALLCONV 140krb5_auth_con_getremotesubkey(mit_krb5_context context, 141 mit_krb5_auth_context ac, 142 mit_krb5_keyblock **key) 143{ 144 LOG_ENTRY(); 145 krb5_keyblock *hkey = NULL; 146 krb5_error_code ret; 147 148 *key = NULL; 149 150 ret = heim_krb5_auth_con_getremotesubkey(HC(context), 151 (krb5_auth_context)ac, 152 &hkey); 153 if (ret) 154 return ret; 155 156 if (hkey) { 157 *key = mshim_malloc(sizeof(**key)); 158 mshim_hkeyblock2mkeyblock(hkey, *key); 159 heim_krb5_free_keyblock(HC(context), hkey); 160 } 161 return 0; 162} 163