merge certificate/private_key to a user_id

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13726 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2004-04-17 08:43:40 +00:00
parent e6dca71033
commit 4121fc049e

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997-2003 Kungliga Tekniska H<>gskolan * Copyright (c) 1997-2004 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden). * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved. * All rights reserved.
* *
@@ -445,21 +445,14 @@ configure(int argc, char **argv)
"enable-pkinit", "enable-pkinit",
NULL); NULL);
if (enable_pkinit) { if (enable_pkinit) {
const char *key_file, *certificate_file, *x509_anchors; const char *user_id, *x509_anchors;
key_file = krb5_config_get_string(context, NULL, user_id = krb5_config_get_string(context, NULL,
"kdc", "kdc",
"pki-key-file", "pki-identity",
NULL); NULL);
if (key_file == NULL) if (user_id == NULL)
krb5_errx(context, 1, "pkinit enabled but no keyfile"); krb5_errx(context, 1, "pkinit enabled but no identity");
certificate_file = krb5_config_get_string(context, NULL,
"kdc",
"pki-certificate",
NULL);
if (certificate_file == NULL)
krb5_errx(context, 1, "pkinit enabled but no certificate");
x509_anchors = krb5_config_get_string(context, NULL, x509_anchors = krb5_config_get_string(context, NULL,
"kdc", "kdc",
@@ -468,7 +461,7 @@ configure(int argc, char **argv)
if (x509_anchors == NULL) if (x509_anchors == NULL)
krb5_errx(context, 1, "pkinit enabled but no X509 anchors"); krb5_errx(context, 1, "pkinit enabled but no X509 anchors");
pk_initialize(certificate_file, key_file, x509_anchors); pk_initialize(user_id, x509_anchors);
} }
#endif #endif