krb5: reorganise crypto.c

lib/krb5/crypto.c was a large, monolithic block of code which made
it very difficult to selectively enable and disable particular
alogrithms.

Reorganise crypto.c into individual files for each encryption and
salt time, and place the structures which tie everything together
into their own file (crypto-algs.c)

Add a non-installed library (librfc3961) and test program
(test_rfc3961) which builds a minimal rfc3961 crypto library, and
checks that it is usable.
This commit is contained in:
Simon Wilkinson
2010-11-01 10:20:53 +00:00
committed by Simon Wilkinson
parent 6184422fef
commit 1d9072f026
24 changed files with 3645 additions and 2619 deletions

View File

@@ -222,30 +222,6 @@ krb5_storage_get_eof_code(krb5_storage *sp)
return sp->eof_code;
}
KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL
_krb5_put_int(void *buffer, unsigned long value, size_t size)
{
unsigned char *p = buffer;
int i;
for (i = size - 1; i >= 0; i--) {
p[i] = value & 0xff;
value >>= 8;
}
return size;
}
KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL
_krb5_get_int(void *buffer, unsigned long *value, size_t size)
{
unsigned char *p = buffer;
unsigned long v = 0;
int i;
for (i = 0; i < size; i++)
v = (v << 8) + p[i];
*value = v;
return size;
}
/**
* Free a krb5 storage.
*