merge certificate/private_key to a user_id
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13724 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -66,8 +66,7 @@ int do_afslog = -1;
|
|||||||
int get_v4_tgt = -1;
|
int get_v4_tgt = -1;
|
||||||
int convert_524 = 0;
|
int convert_524 = 0;
|
||||||
int fcache_version;
|
int fcache_version;
|
||||||
char *pk_cert_file = NULL;
|
char *pk_user_id = NULL;
|
||||||
char *pk_key_file = NULL;
|
|
||||||
char *pk_x509_anchors = NULL;
|
char *pk_x509_anchors = NULL;
|
||||||
int pk_use_dh = -1;
|
int pk_use_dh = -1;
|
||||||
|
|
||||||
@@ -147,11 +146,9 @@ static struct getargs args[] = {
|
|||||||
"request a Windows PAC" },
|
"request a Windows PAC" },
|
||||||
|
|
||||||
#ifdef PKINIT
|
#ifdef PKINIT
|
||||||
{ "certificate", 'C', arg_string, &pk_cert_file,
|
{ "pk-user", 'C', arg_string, &pk_user_id,
|
||||||
"principal's public key certificate", "filename"},
|
"principal's public/private/certificate identifier",
|
||||||
|
"id" },
|
||||||
{ "private-key", 'K', arg_string, &pk_key_file,
|
|
||||||
"principal's private key", "filename" },
|
|
||||||
|
|
||||||
{ "x509-anchors", 'D', arg_string, &pk_x509_anchors,
|
{ "x509-anchors", 'D', arg_string, &pk_x509_anchors,
|
||||||
"directory with CA certificates", "directory" },
|
"directory with CA certificates", "directory" },
|
||||||
@@ -461,13 +458,12 @@ get_new_tickets(krb5_context context,
|
|||||||
if (pac_flag != -1)
|
if (pac_flag != -1)
|
||||||
krb5_get_init_creds_opt_set_pac_request(context, opt,
|
krb5_get_init_creds_opt_set_pac_request(context, opt,
|
||||||
pac_flag ? TRUE : FALSE);
|
pac_flag ? TRUE : FALSE);
|
||||||
if (pk_cert_file || pk_key_file) {
|
if (pk_user_id) {
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
if (pk_use_dh == 1)
|
if (pk_use_dh == 1)
|
||||||
flags |= 1;
|
flags |= 1;
|
||||||
ret = krb5_get_init_creds_opt_set_pkinit(context, opt,
|
ret = krb5_get_init_creds_opt_set_pkinit(context, opt,
|
||||||
pk_cert_file,
|
pk_user_id,
|
||||||
pk_key_file,
|
|
||||||
pk_x509_anchors,
|
pk_x509_anchors,
|
||||||
flags,
|
flags,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -537,7 +533,7 @@ get_new_tickets(krb5_context context,
|
|||||||
server,
|
server,
|
||||||
opt);
|
opt);
|
||||||
krb5_kt_close(context, kt);
|
krb5_kt_close(context, kt);
|
||||||
} else if (pk_key_file) {
|
} else if (pk_user_id) {
|
||||||
ret = krb5_get_init_creds_password (context,
|
ret = krb5_get_init_creds_password (context,
|
||||||
&cred,
|
&cred,
|
||||||
principal,
|
principal,
|
||||||
|
Reference in New Issue
Block a user