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

krb5_unparse_name_ext — Convert multiple protocol format principal names to string format

  Table of Contents

  Glossary

  Index

C Prototype

krb5_error_code krb5_unparse_name_ext(
krb5_context context,
krb5_const_principal principal,
char **name,
int *size );

Arguments

context (input/output) 

The context structure.

principal (input) 

Multipart principal format used in the protocols.

name (output) 

Single string representation of a Kerberos principal name.

size (output) 

Size of the unparsed name buffer.

Description

This routine is designed for applications which must unparse a large number of principals, and are concerned about the speed impact of needing to do a lot of memory allocations and deallocations. It functions similarly to krb5_unparse_name except if *name is nonNULL, in which case, it is assumed to contain an allocated buffer of size *size and this buffer will be resized with realloc to hold the unparsed name. Note that in this case, *size must not be NULL.

The *name argument points to allocated storage and should be freed by the caller when finished.

Return Values

This routine returns the following KRB5 status code:

0Successful completion.

ENOMEM

Insufficient memory.