/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* NAME
* cred.c
*
* DESCRIPTION
* Provide an interface to assemble and disassemble krb5_cred
* structures.
*
*/
/*
*/
#include "k5-int.h"
#include "cleanup.h"
#include "auth_con.h"
#include <stddef.h> /* NULL */
#include <stdlib.h> /* malloc */
#include <errno.h> /* ENOMEM */
/* Solaris Kerberos */
#include "kerberos_dtrace.h"
/*-------------------- encrypt_credencpart --------------------*/
/*
* encrypt the enc_part of krb5_cred
*/
static krb5_error_code
{
/* start by encoding to-be-encrypted part of the message */
return retval;
/*
* If the keyblock is NULL, just copy the data from the encoded
* data to the ciphertext area.
*/
return 0;
}
/* call the encryption routine */
if (retval) {
}
return retval;
}
/*----------------------- krb5_mk_ncred_basic -----------------------*/
static krb5_error_code
{
int i;
/* Get memory for creds and initialize it */
return ENOMEM;
/*
* For each credential in the list, initialize a cred info
* structure and copy the ticket into the ticket list.
*/
for (i = 0; i < nppcreds; i++) {
goto cleanup;
}
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
}
/*
* NULL terminate the lists.
*/
/* encrypt the credential encrypted part */
/* Solaris Kerberos begin */
if (*ret_credenc != NULL)
**ret_credenc = credenc;
} else
/* Solaris Kerberos end */
return retval;
}
/*----------------------- krb5_mk_ncred -----------------------*/
/*
* This functions takes as input an array of krb5_credentials, and
* outputs an encoded KRB_CRED message suitable for krb5_rd_cred
*/
{
/* Solaris Kerberos */
local_fulladdr.contents = 0;
remote_fulladdr.contents = 0;
return KRB5KRB_AP_ERR_BADADDR;
/*
* Allocate memory for a NULL terminated list of tickets.
*/
;
return ENOMEM;
sizeof(krb5_ticket *))) == NULL) {
goto error;
}
/* Get keyblock */
/* Get replay info */
goto error;
}
/* Need a better error */
goto error;
}
&replaydata.usec)))
goto error;
}
}
if (auth_context->local_addr) {
if (auth_context->local_port) {
&local_fulladdr)))
goto error;
} else {
}
}
if (auth_context->remote_addr) {
if (auth_context->remote_port) {
&remote_fulladdr)))
goto error;
} else {
}
}
/* Setup creds structure */
/* Solaris Kerberos */
goto error;
}
goto error;
/* should we really error out here? XXX */
goto error;
}
}
/* Encode creds structure */
/* Solaris Kerberos dtrace */
if (retval == 0)
/* Solaris Kerberos begin */
}
/* Solaris Kerberos end */
if (retval) {
if (increased_sequence)
}
return retval;
}
/*----------------------- krb5_mk_1cred -----------------------*/
/*
* A convenience function that calls krb5_mk_ncred.
*/
{
return ENOMEM;
}
return retval;
}