Deleted Added
full compact
auth_context.c (102644) auth_context.c (103423)
1/*
1/*
2 * Copyright (c) 1997 - 2001 Kungliga Tekniska H�gskolan
2 * Copyright (c) 1997 - 2002 Kungliga Tekniska H�gskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#include "krb5_locl.h"
35
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#include "krb5_locl.h"
35
36RCSID("$Id: auth_context.c,v 1.58 2002/08/15 08:23:07 joda Exp $");
36RCSID("$Id: auth_context.c,v 1.59 2002/09/02 17:11:02 joda Exp $");
37
38krb5_error_code
39krb5_auth_con_init(krb5_context context,
40 krb5_auth_context *auth_context)
41{
42 krb5_auth_context p;
43
44 ALLOC(p, 1);

--- 242 unchanged lines hidden (view full) ---

287 krb5_keyblock *keyblock)
288{
289 if(auth_context->local_subkey)
290 krb5_free_keyblock(context, auth_context->local_subkey);
291 return copy_key(context, keyblock, &auth_context->local_subkey);
292}
293
294krb5_error_code
37
38krb5_error_code
39krb5_auth_con_init(krb5_context context,
40 krb5_auth_context *auth_context)
41{
42 krb5_auth_context p;
43
44 ALLOC(p, 1);

--- 242 unchanged lines hidden (view full) ---

287 krb5_keyblock *keyblock)
288{
289 if(auth_context->local_subkey)
290 krb5_free_keyblock(context, auth_context->local_subkey);
291 return copy_key(context, keyblock, &auth_context->local_subkey);
292}
293
294krb5_error_code
295krb5_auth_con_generatelocalsubkey(krb5_context context,
296 krb5_auth_context auth_context,
297 krb5_keyblock *key)
298{
299 krb5_error_code ret;
300 krb5_keyblock *subkey;
301
302 ret = krb5_generate_subkey (context, key, &subkey);
303 if(ret)
304 return ret;
305 if(auth_context->local_subkey)
306 krb5_free_keyblock(context, auth_context->local_subkey);
307 auth_context->local_subkey = subkey;
308 return 0;
309}
310
311
312krb5_error_code
295krb5_auth_con_setremotesubkey(krb5_context context,
296 krb5_auth_context auth_context,
297 krb5_keyblock *keyblock)
298{
299 if(auth_context->remote_subkey)
300 krb5_free_keyblock(context, auth_context->remote_subkey);
301 return copy_key(context, keyblock, &auth_context->remote_subkey);
302}

--- 172 unchanged lines hidden ---
313krb5_auth_con_setremotesubkey(krb5_context context,
314 krb5_auth_context auth_context,
315 krb5_keyblock *keyblock)
316{
317 if(auth_context->remote_subkey)
318 krb5_free_keyblock(context, auth_context->remote_subkey);
319 return copy_key(context, keyblock, &auth_context->remote_subkey);
320}

--- 172 unchanged lines hidden ---