RSA BSAFE Micro Edition Suite

Streamlined security for mobile and embedded devices

Search  Print

Error Reporting Functions

This section includes functions that can be used to obtain information from the library about errors that occurred during operations.

Defines

#define ERR_free_strings()
 A macro defined as nothing in order to remove the function altogether.

#define ERR_remove_state(pid)
 A macro to clear the stored error buffer.

#define ERR_get_state()
 A macro defined as nothing in order to remove the function altogether.


Functions

 ERR_put_error (int lib, int func, int reason, char *file, int line)
 Places an error from the library lib for the function func with the reason reason in the global error stack. More...

 ERR_clear_error ()
 Clears the error buffer and discards all unread errors.

 ERR_get_error ()
 Retrieves the latest error from the error stack. More...

 ERR_peek_error ()
 Retrieves the latest error from the error stack. More...

 ERR_print_errors_fp (FILE *fp)
 Prints the error stack to the file pointer fp. More...

 ERR_print_errors (BIO *bio)
 Prints the error stack to the BIO bio. More...


Function Documentation

ERR_get_error   ;
 

Retrieves the latest error from the error stack. This is a destructive operation since the error is removed from the stack at the same time. Other errors that may also exist in the stack are not affected.

Returns:
The latest error code from the stack if available.
note.gif
Repeated calls to this function will return error codes until the stack is empty. When the stack is empty a value of 0 is returned.
Samples:
simple.c.

ERR_peek_error   ;
 

Retrieves the latest error from the error stack. This is a non-destructive operation since the error remains on the stack. Other errors that may also exist in the stack are not affected.

Returns:
The latest error code from the stack, if available.
Samples:
simple.c.

ERR_print_errors BIO   bio ;
 

Prints the error stack to the BIO bio.

Parameters:
bio [In] A BIO reference to be used as the output channel for the error information.
See also:
ERR_print_errors_fp().
Samples:
bio_client.c, bio_server.c, cache_server.c, evpkey2rpkey.c, nbio_client.c, nbio_server.c, p7ssl_client.c, p7ssl_server.c, rcert2sslcert.c, sock_client.c, sock_server.c, ssl_client.c, ssl_server.c, and sslcert2rcert.c.

ERR_print_errors_fp FILE *    fp ;
 

Prints the error stack to the file pointer fp.

Parameters:
fp [In] The FILE reference.
note.gif
This function is not available under WIN16. Use ERR_print_errors() instead.
See also:
ERR_print_errors().
Samples:
simple.c.

ERR_put_error int    lib,
int    func,
int    reason,
char *    file,