summaryrefslogtreecommitdiffstats
path: root/src/lib/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/crypto')
-rw-r--r--src/lib/crypto/des/string2key.c4
-rw-r--r--src/lib/crypto/dk/dk_encrypt.c2
-rw-r--r--src/lib/crypto/pbkdf2.c6
3 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/crypto/des/string2key.c b/src/lib/crypto/des/string2key.c
index 4fe9e4799..016ae3e20 100644
--- a/src/lib/crypto/des/string2key.c
+++ b/src/lib/crypto/des/string2key.c
@@ -1,7 +1,7 @@
/*
* lib/crypto/des/des_s2k.c
*
- * Copyright 2004 by the Massachusetts Institute of Technology.
+ * Copyright 2004, 2008 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
@@ -84,7 +84,7 @@ mit_des_string_to_key_int (krb5_keyblock *key,
a byte array, not a string. */
copy = malloc(copylen);
if (copy == NULL)
- return errno;
+ return ENOMEM;
memcpy(copy, pw->data, pw->length);
if (salt)
memcpy(copy + pw->length, salt->data, salt->length);
diff --git a/src/lib/crypto/dk/dk_encrypt.c b/src/lib/crypto/dk/dk_encrypt.c
index 5b2d3e793..750f43ffe 100644
--- a/src/lib/crypto/dk/dk_encrypt.c
+++ b/src/lib/crypto/dk/dk_encrypt.c
@@ -205,7 +205,7 @@ trunc_hmac (const struct krb5_hash_provider *hash,
tmp.length = hashsize;
tmp.data = malloc(hashsize);
if (tmp.data == NULL)
- return errno;
+ return ENOMEM;
ret = krb5_hmac(hash, ki, num, input, &tmp);
if (ret == 0)
memcpy(output->data, tmp.data, output->length);
diff --git a/src/lib/crypto/pbkdf2.c b/src/lib/crypto/pbkdf2.c
index ff446dbde..a6cce1cd0 100644
--- a/src/lib/crypto/pbkdf2.c
+++ b/src/lib/crypto/pbkdf2.c
@@ -1,7 +1,7 @@
/*
* lib/crypto/pbkdf2.c
*
- * Copyright 2002 by the Massachusetts Institute of Technology.
+ * Copyright 2002, 2008 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
@@ -171,11 +171,11 @@ krb5int_pbkdf2 (krb5_error_code (*prf)(krb5_keyblock *, krb5_data *,
utmp1 = /*output + dklen; */ malloc(hlen);
if (utmp1 == NULL)
- return errno;
+ return ENOMEM;
utmp2 = /*utmp1 + hlen; */ malloc(salt->length + 4 + hlen);
if (utmp2 == NULL) {
free(utmp1);
- return errno;
+ return ENOMEM;
}
/* Step 3. */