RSA BSAFE Micro Edition Suite

Streamlined security for mobile and embedded devices

Search  Print

Input/Output Functions

This section describes the SSL Basic Input/Output (BIO) functions that enable the BIO functionality for SSL-C. SSL involves data exchange between two end points. The end point communications are encapsulated in BIOs. BIOs can be either endpoints or filters. BIOs exist for the following:
  • Sockets.
  • TCP/IP non-blocking connection forming sockets.
  • Buffering.
  • Memory arrays.
  • File descriptors.
  • Encrypting.
  • Digests.
  • File pointers.

    Since a BIO is a standardized interface for I/O operations using sockets and files, BIOs hide many machine-specific I/O method details, providing a consistent I/O Application Programming Interface (API).

    Functions

    BIO* R_CDECL BIO_new_ssl (SSL_CTX *ctx, int client)
     Creates a new SSL BIO pointer. More...

    BIO* R_CDECL BIO_new_ssl_connect (SSL_CTX *ctx)
     Creates a new BIO with an associated SSL structure based on the SSL_CTX structure passed in. More...

    BIO* R_CDECL BIO_new_buffer_ssl_connect (SSL_CTX *ctx)
     Creates a new BIO SSL structure via BIO_new_ssl_connect() from the passed SSL_CTX structure. More...

    int R_CDECL BIO_ssl_copy_session (BIO *to, BIO *from)
     Copies the SSL_SESSION from the SSL that is associated with the from BIO into the to BIO. More...

    int R_CDECL BIO_ssl_shutdown (BIO *bio)
     Closes the SSL connection for the BIO structure bio. More...


    Function Documentation

    BIO* R_CDECL BIO_new_buffer_ssl_connect SSL_CTX   ctx ;
     

    Creates a new BIO SSL structure via BIO_new_ssl_connect() from the passed SSL_CTX structure. Then creates a buffer BIO structure and pushes the previously created SSL BIO onto its stack.

    Parameters:
    ctx [In] The SSL_CTX reference.
    Returns:
    The BIO reference.
    NULL indicates error.

    BIO* R_CDECL BIO_new_ssl SSL_CTX   ctx,
    int    client
    ;
     

    Creates a new SSL BIO pointer. Uses the passed SSL_CTX to create an SSL structure to be associated with the BIO. The client indicates whether the SSL should be initialized as a connect or accept state.

    Parameters:
    ctx [In] The SSL_CTX reference.
    client [In] The client or server flag.
    Returns:
    The BIO reference.
    NULL indicates error.
    Samples:
    bio_server.c, and nbio_server.c.

    BIO* R_CDECL BIO_new_ssl_connect SSL_CTX   ctx ;
     

    Creates a new BIO with an associated SSL structure based on the SSL_CTX structure passed in. The SSL structure is initialized in the connect state (client). It returns a reference to the newly created BIO stack that has been created.

    Parameters:
    ctx [In] The SSL_CTX reference.
    Returns:
    The BIO reference.
    NULL indicates error.
    Samples:
    bio_client.c, and nbio_client.c.

    int R_CDECL BIO_ssl_copy_session BIO   to,
    BIO   from
    ;
     

    Copies the SSL_SESSION from the