From 3669790e9907f572eeea63902639892866cbe9ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Sun, 17 Aug 2008 14:08:32 +0000 Subject: [PATCH] add krb5_enctype_enable and some doxygen git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23583 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/crypto.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/lib/krb5/crypto.c b/lib/krb5/crypto.c index 95f0a9950..a51f8e34a 100644 --- a/lib/krb5/crypto.c +++ b/lib/krb5/crypto.c @@ -3742,6 +3742,18 @@ krb5_crypto_getconfoundersize(krb5_context context, return 0; } + +/** + * Disable enctyption type + * + * @param context Kerberos 5 context + * @param enctype encryption type to disable + * + * @return Return an error code or 0. + * + * @ingroup krb5 + */ + krb5_error_code KRB5_LIB_FUNCTION krb5_enctype_disable(krb5_context context, krb5_enctype enctype) @@ -3758,6 +3770,34 @@ krb5_enctype_disable(krb5_context context, return 0; } +/** + * Enable enctyption type + * + * @param context Kerberos 5 context + * @param enctype encryption type to enable + * + * @return Return an error code or 0. + * + * @ingroup krb5 + */ + +krb5_error_code KRB5_LIB_FUNCTION +krb5_enctype_enable(krb5_context context, + krb5_enctype enctype) +{ + struct encryption_type *et = _find_enctype(enctype); + if(et == NULL) { + if (context) + krb5_set_error_message (context, KRB5_PROG_ETYPE_NOSUPP, + "encryption type %d not supported", + enctype); + return KRB5_PROG_ETYPE_NOSUPP; + } + et->flags &= ~F_DISABLED; + return 0; +} + + krb5_error_code KRB5_LIB_FUNCTION krb5_string_to_key_derived(krb5_context context, const void *str,