aboutsummaryrefslogtreecommitdiff
path: root/src/lib/krb5/krb/init_ctx.c
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1996-05-14 08:41:32 +0000
committerTheodore Tso <tytso@mit.edu>1996-05-14 08:41:32 +0000
commit278703869bc74db3c026e83e1e5768c5e92c8f0a (patch)
treea31299e938a04b60037cb38eba816a8fd2ff16f8 /src/lib/krb5/krb/init_ctx.c
parent5b432f0d3c14f711e21dab3e1cb4a2179d6e8070 (diff)
downloadkrb5-278703869bc74db3c026e83e1e5768c5e92c8f0a.zip
krb5-278703869bc74db3c026e83e1e5768c5e92c8f0a.tar.gz
krb5-278703869bc74db3c026e83e1e5768c5e92c8f0a.tar.bz2
ser_ctx.c (krb5_context_size, krb5_context_externalize,
krb5_context_internalize): Add missing fields from the serialized context: clockskew, default_kdc_req_sumtype, default_ap_req_sumtype, default_safe_sumtype, kdc_default_options, library_options, profile_secure, fcc_default_format, scc_default_format. ser_actx.c (krb5_auth_context_size, krb5_auth_context_externalize, krb5_auth_context_internalize): Serialize the two fields req_cksumtype and safe_cksumtype, instead of the one cksumtype field. mk_safe.c (krb_mk_safe): Use safe_cksumtype instead of cksumtype in the auth context. mk_req_ext.c (krb5_mk_req_extended): Use req_cksumtype instead of cksumtype in the auth context. init_ctx.c (krb5_init_context): Add support for new profile relations libdefaults/tkt_lifetime, libdefaults/kdc_req_checksum_type, libdefaults/ap_req_cksumtype, libdefaults/safe_checksumtype, and libdefaults/kdc_default_options. auth_con.h: Remove old cksumtype element, and replace it with req_cksumtype and safe_cksumtype. auth_con.c (krb5_auth_con_init): Initialize the req_cksumtype and safe_cksumtype from the context's default req_cksumtype and safe_cksumtype. (krb5_auth_con_set_req_cksumtype, krb5_auth_con_set_safe_cksumtype): New functions, to replace old krb5_auth_con_setcksumtype git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8017 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/krb/init_ctx.c')
-rw-r--r--src/lib/krb5/krb/init_ctx.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/lib/krb5/krb/init_ctx.c b/src/lib/krb5/krb/init_ctx.c
index d28f63d..83b2c48 100644
--- a/src/lib/krb5/krb/init_ctx.c
+++ b/src/lib/krb5/krb/init_ctx.c
@@ -57,12 +57,31 @@ krb5_init_context(context)
0, 5 * 60, &tmp);
ctx->clockskew = tmp;
+ /* Default ticket lifetime is
+ profile_get_integer(ctx->profile, "libdefaults", "tkt_lifetime",
+ 0, 10 * 60 * 60, &tmp);
+ ctx->clockskew = tmp;
+
/* DCE 1.1 and below only support CKSUMTYPE_RSA_MD4 (2) */
- /* DCE add checksum_type = 2 to krb5.conf */
- profile_get_integer(ctx->profile, "libdefaults", "checksum_type", 0,
- CKSUMTYPE_RSA_MD5, &tmp);
+ /* DCE add kdc_req_checksum_type = 2 to krb5.conf */
+ profile_get_integer(ctx->profile, "libdefaults",
+ "kdc_req_checksum_type", 0, CKSUMTYPE_RSA_MD5,
+ &tmp);
ctx->kdc_req_sumtype = tmp;
+ profile_get_integer(ctx->profile, "libdefaults",
+ "ap_req_checksum_type", 0, CKSUMTYPE_RSA_MD5,
+ &tmp);
+ ctx->default_ap_req_sumtype = tmp;
+
+ profile_get_integer(ctx->profile, "libdefaults",
+ "safe_checksum_type", 0,
+ CKSUMTYPE_RSA_MD5_DES, &tmp);
+ ctx->default_safe_sumtype = tmp;
+
+ profile_get_integer(ctx->profile, "libdefaults",
+ "kdc_default_options", 0,
+ KDC_OPT_RENEWABLE_OK, &tmp);
ctx->kdc_default_options = KDC_OPT_RENEWABLE_OK;
#ifdef _MACINTOSH
#define DEFAULT_KDC_TIMESYNC 1