keyhole logo

Functions

hx509 printing functions

Functions

void hx509_print_stdout (void *ctx, const char *fmt, va_list va)
int hx509_oid_sprint (const heim_oid *oid, char **str)
void hx509_oid_print (const heim_oid *oid, hx509_vprint_func func, void *ctx)
void hx509_bitstring_print (const heim_bit_string *b, hx509_vprint_func func, void *ctx)
int hx509_cert_keyusage_print (hx509_context context, hx509_cert c, char **s)
int hx509_validate_ctx_init (hx509_context context, hx509_validate_ctx *ctx)
void hx509_validate_ctx_set_print (hx509_validate_ctx ctx, hx509_vprint_func func, void *c)
void hx509_validate_ctx_add_flags (hx509_validate_ctx ctx, int flags)
void hx509_validate_ctx_free (hx509_validate_ctx ctx)
int hx509_validate_cert (hx509_context context, hx509_validate_ctx ctx, hx509_cert cert)

Function Documentation

void hx509_bitstring_print ( const heim_bit_string *  b,
hx509_vprint_func  func,
void *  ctx 
)

Print a bitstring using a hx509_vprint_func function. To print to stdout use hx509_print_stdout().

Parameters:
bbit string to print.
funchx509_vprint_func to print with.
ctxcontext variable to hx509_vprint_func function.
int hx509_cert_keyusage_print ( hx509_context  context,
hx509_cert  c,
char **  s 
)

Print certificate usage for a certificate to a string.

Parameters:
contextA hx509 context.
ca certificate print the keyusage for.
sthe return string with the keysage printed in to, free with hx509_xfree().
Returns:
An hx509 error code, see hx509_get_error_string().
void hx509_oid_print ( const heim_oid *  oid,
hx509_vprint_func  func,
void *  ctx 
)

Print a oid using a hx509_vprint_func function. To print to stdout use hx509_print_stdout().

Parameters:
oidoid to print
funchx509_vprint_func to print with.
ctxcontext variable to hx509_vprint_func function.
int hx509_oid_sprint ( const heim_oid *  oid,
char **  str 
)

Print a oid to a string.

Parameters:
oidoid to print
strallocated string, free with hx509_xfree().
Returns:
An hx509 error code, see hx509_get_error_string().
void hx509_print_stdout ( void *  ctx,
const char *  fmt,
va_list  va 
)

Helper function to print on stdout for:

Parameters:
ctxthe context to the print function. If the ctx is NULL, stdout is used.
fmtthe printing format.
vathe argumet list.
int hx509_validate_cert ( hx509_context  context,
hx509_validate_ctx  ctx,
hx509_cert  cert 
)

Validate/Print the status of the certificate.

Parameters:
contextA hx509 context.
ctxA hx509 validation context.
certthe cerificate to validate/print.
Returns:
An hx509 error code, see hx509_get_error_string().
void hx509_validate_ctx_add_flags ( hx509_validate_ctx  ctx,
int  flags 
)

Add flags to control the behaivor of the hx509_validate_cert() function.

Parameters:
ctxA hx509 validation context.
flagsflags to add to the validation context.
Returns:
An hx509 error code, see hx509_get_error_string().
void hx509_validate_ctx_free ( hx509_validate_ctx  ctx )

Free an hx509 validate context.

Parameters:
ctxthe hx509 validate context to free.
int hx509_validate_ctx_init ( hx509_context  context,
hx509_validate_ctx *  ctx 
)

Allocate a hx509 validation/printing context.

Parameters:
contextA hx509 context.
ctxa new allocated hx509 validation context, free with hx509_validate_ctx_free().
Returns:
An hx509 error code, see hx509_get_error_string().
void hx509_validate_ctx_set_print ( hx509_validate_ctx  ctx,
hx509_vprint_func  func,
void *  c 
)

Set the printing functions for the validation context.

Parameters:
ctxa hx509 valication context.
functhe printing function to usea.
cthe context variable to the printing function.
Returns:
An hx509 error code, see hx509_get_error_string().

Generated on Fri Dec 6 2013 08:13:05 for Heimdalx509library by doxygen 1.7.2