~ubuntu-branches/ubuntu/precise/krb5/precise-updates

« back to all changes in this revision

Viewing changes to src/lib/crypto/krb/combine_keys.c

  • Committer: Package Import Robot
  • Author(s): Sam Hartman
  • Date: 2011-12-01 19:34:41 UTC
  • mfrom: (28.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20111201193441-9tipg3aru1jsidyv
Tags: 1.10+dfsg~alpha1-6
* Fix segfault with unknown hostnames in krb5_sname_to_principal,
  Closes: #650671
* Indicate that this library breaks libsmbclient versions that depend on
  krb5_locate_kdc, Closes: #650603, #650611

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
 
2
/* Copyright (c) 2002 Naval Research Laboratory (NRL/CCS) */
2
3
/*
3
 
 * Copyright (c) 2002 Naval Research Laboratory (NRL/CCS)
4
 
 *
5
4
 * Permission to use, copy, modify and distribute this software and its
6
5
 * documentation is hereby granted, provided that both the copyright
7
6
 * notice and this permission notice appear in all copies of the software,
10
9
 * NRL ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND
11
10
 * DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER
12
11
 * RESULTING FROM THE USE OF THIS SOFTWARE.
13
 
 *
 
12
 */
 
13
 
 
14
/*
14
15
 * Key combination function.
15
16
 *
16
17
 * If Key1 and Key2 are two keys to be combined, the algorithm to combine
43
44
 * ASCII encoding of the string "combine"
44
45
 */
45
46
 
46
 
#include "k5-int.h"
47
 
#include "etypes.h"
48
 
#include "dk.h"
 
47
#include "crypto_int.h"
49
48
 
50
49
static krb5_error_code dr(const struct krb5_enc_provider *enc,
51
50
                          const krb5_keyblock *inkey, unsigned char *outdata,
157
156
    tkeyblock.length = keylength;
158
157
    tkeyblock.contents = output;
159
158
 
160
 
    ret = (*enc->make_key)(&randbits, &tkeyblock);
 
159
    ret = (*ktp->rand2key)(&randbits, &tkeyblock);
161
160
    if (ret)
162
161
        goto cleanup;
163
162