HP Open Source Security for OpenVMS Volume 3: Kerberos > Chapter 6 KRB5 (Kerberos V5) Application Programming Interface

krb5_mk_rep — Format and encrypt an AP_REP message

  Table of Contents

  Glossary

  Index

C Prototype

krb5_error_code krb5_mk_rep(
krb5_context context,
krb5_auth_context auth_context,
krb5_data *outbuf );

Arguments

context (input/output) 

The context structure.

auth_context (input/output) 

Authentication context.

outbuf (output) 

AP_REQ message information.

Description

This routine formats and encrypts an AP_REP message, including in it the data in the authentp portion of auth_context, encrypted using the keyblock portion of auth_context.

When successful, outbuf->length and outbuf->data are filled in with the length of the AP_REQ message and allocated data holding it. The outbuf->data argument should be freed by the caller when it is no longer needed.

If the flags in auth_context indicate that a sequence number should be used (either KRB5_AUTH_CONTEXT_DO_SEQUENCE or KRB5_AUTH_CONTEXT_RET_SEQUENCE) and the local sequence number in the auth_context is 0, a new number will be generated with krb5_generate_seq_number.

Return Values

This routine returns the following KRB5 status code:

0

Successful completion.