summaryrefslogtreecommitdiffstats
path: root/crypto/userspace/libtomcrypt
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2010-08-27 09:32:48 +0200
committerMiloslav Trmač <mitr@redhat.com>2010-08-27 09:32:48 +0200
commit9cab3a1a9660ed5f798b063aa7e827eb0c95ba94 (patch)
treefb5dadde55ce30a6634f113bb6ca35682833ecf3 /crypto/userspace/libtomcrypt
parenta6d3a923924a7b751981d93ade82854985abebba (diff)
parent3d758323280763fe59b1f61d4f86aa2a29fe3775 (diff)
downloadkernel-crypto-9cab3a1a9660ed5f798b063aa7e827eb0c95ba94.tar.gz
kernel-crypto-9cab3a1a9660ed5f798b063aa7e827eb0c95ba94.tar.xz
kernel-crypto-9cab3a1a9660ed5f798b063aa7e827eb0c95ba94.zip
Merge branch 'standalone-master' into standalone-rename
Conflicts: TODO crypto.4 examples/Makefile examples/ncr.c examples/pk.c examples/speed.c include/linux/cryptodev.h userspace/setkey.c
Diffstat (limited to 'crypto/userspace/libtomcrypt')
-rw-r--r--crypto/userspace/libtomcrypt/hashes/hash_memory.c2
-rw-r--r--crypto/userspace/libtomcrypt/hashes/hash_memory_multi.c2
-rw-r--r--crypto/userspace/libtomcrypt/headers/tomcrypt_argchk.h4
-rw-r--r--crypto/userspace/libtomcrypt/headers/tomcrypt_cfg.h4
-rw-r--r--crypto/userspace/libtomcrypt/headers/tomcrypt_pk.h2
-rw-r--r--crypto/userspace/libtomcrypt/pk/rsa/rsa_import.c2
6 files changed, 8 insertions, 8 deletions
diff --git a/crypto/userspace/libtomcrypt/hashes/hash_memory.c b/crypto/userspace/libtomcrypt/hashes/hash_memory.c
index a416de9624e..c6f51881245 100644
--- a/crypto/userspace/libtomcrypt/hashes/hash_memory.c
+++ b/crypto/userspace/libtomcrypt/hashes/hash_memory.c
@@ -44,7 +44,7 @@ int hash_memory(const struct algo_properties_st *hash, const unsigned char *in,
return CRYPT_BUFFER_OVERFLOW;
}
- err = cryptodev_hash_init( &hdata, hash->kstr, 0, NULL, 0);
+ err = cryptodev_hash_init(&hdata, hash->kstr, NULL, 0);
if (err < 0) {
err = CRYPT_INVALID_HASH;
goto LBL_ERR;
diff --git a/crypto/userspace/libtomcrypt/hashes/hash_memory_multi.c b/crypto/userspace/libtomcrypt/hashes/hash_memory_multi.c
index a9149166700..74226767a72 100644
--- a/crypto/userspace/libtomcrypt/hashes/hash_memory_multi.c
+++ b/crypto/userspace/libtomcrypt/hashes/hash_memory_multi.c
@@ -50,7 +50,7 @@ int hash_memory_multi(const struct algo_properties_st *hash, unsigned char *out,
return CRYPT_BUFFER_OVERFLOW;
}
- err = cryptodev_hash_init( &hdata, hash->kstr, 0, NULL, 0);
+ err = cryptodev_hash_init(&hdata, hash->kstr, NULL, 0);
if (err < 0) {
err = CRYPT_INVALID_HASH;
goto LBL_ERR;
diff --git a/crypto/userspace/libtomcrypt/headers/tomcrypt_argchk.h b/crypto/userspace/libtomcrypt/headers/tomcrypt_argchk.h
index 1b94434ccb3..1ba08c7ffad 100644
--- a/crypto/userspace/libtomcrypt/headers/tomcrypt_argchk.h
+++ b/crypto/userspace/libtomcrypt/headers/tomcrypt_argchk.h
@@ -25,8 +25,8 @@ void crypt_argchk(char *v, char *s, int d);
#elif ARGTYPE == 4
-#define LTC_ARGCHK(x) if (!(x)) return CRYPT_INVALID_ARG;
-#define LTC_ARGCHKVD(x) if (!(x)) return;
+#define LTC_ARGCHK(x) if (!(x)) { printk( "\nwarning: ARGCHK failed at %s:%d\n", __FILE__, __LINE__); return CRYPT_INVALID_ARG; }
+#define LTC_ARGCHKVD(x) if (!(x)) { printk( "\nwarning: ARGCHK failed at %s:%d\n", __FILE__, __LINE__); return; }
#endif
diff --git a/crypto/userspace/libtomcrypt/headers/tomcrypt_cfg.h b/crypto/userspace/libtomcrypt/headers/tomcrypt_cfg.h
index b750c8be78c..8ad90bce4b0 100644
--- a/crypto/userspace/libtomcrypt/headers/tomcrypt_cfg.h
+++ b/crypto/userspace/libtomcrypt/headers/tomcrypt_cfg.h
@@ -42,9 +42,9 @@ LTC_EXPORT int LTC_CALL XSTRCMP(const char *s1, const char *s2);
#endif
-/* type of argument checking, 0=default, 1=fatal and 2=error+continue, 3=nothing */
+/* type of argument checking, 0=default, 1=fatal and 2=error+continue, 3=nothing, 4=return error */
#ifndef ARGTYPE
- #define ARGTYPE 0
+ #define ARGTYPE 4
#endif
/* Controls endianess and size of registers. Leave uncommented to get platform neutral [slower] code
diff --git a/crypto/userspace/libtomcrypt/headers/tomcrypt_pk.h b/crypto/userspace/libtomcrypt/headers/tomcrypt_pk.h
index 145165efe51..73348805748 100644
--- a/crypto/userspace/libtomcrypt/headers/tomcrypt_pk.h
+++ b/crypto/userspace/libtomcrypt/headers/tomcrypt_pk.h
@@ -26,7 +26,7 @@ int rand_prime(mp_int *N, long len);
/* Min and Max RSA key sizes (in bits) */
#define MIN_RSA_SIZE 1024
-#define MAX_RSA_SIZE 4096
+#define MAX_RSA_SIZE 8192
/** RSA LTC_PKCS style key */
typedef struct Rsa_key {
diff --git a/crypto/userspace/libtomcrypt/pk/rsa/rsa_import.c b/crypto/userspace/libtomcrypt/pk/rsa/rsa_import.c
index 9f3c5bfa642..87cb1030d47 100644
--- a/crypto/userspace/libtomcrypt/pk/rsa/rsa_import.c
+++ b/crypto/userspace/libtomcrypt/pk/rsa/rsa_import.c
@@ -84,7 +84,7 @@ int rsa_import(const unsigned char *in, unsigned long inlen, rsa_key *key)
}
/* it's a private key */
if ((err = der_decode_sequence_multi(in, inlen,
- LTC_ASN1_INTEGER, 1UL, zero,
+ LTC_ASN1_INTEGER, 1UL, &zero,
LTC_ASN1_INTEGER, 1UL, &key->N,
LTC_ASN1_INTEGER, 1UL, &key->e,
LTC_ASN1_INTEGER, 1UL, &key->d,