RSA BSAFE SSL-C

Security protocol components for C

Search

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

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

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

    BIOBIO_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 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 BIO_ssl_shutdown (BIO *bio)
     Closes the SSL connection for the BIO structure bio. More...


    Function Documentation

    BIO* 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* 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* 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 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.

    Parameters:
    to [In] The BIO reference to copy to.
    from [In, Out] The BIO reference from which to copy.
    Returns:
    1 indicates success.
    0 indicates failure.

    int BIO_ssl_shutdown BIO   bio ;
     

    Closes the SSL connection for the BIO structure bio. The BIO may be a reference to a stack of BIOs and the stack will be searched, in order, until an SSL BIO is found or the stack search is finished. The shutdown is sent to the first SSL BIO found.

    Parameters:
    bio [In] A stack of BIOs which may contain an SSL BIO.
    Returns:
    1 indicates the shutdown was successful or that there was no SSL connection to shut down.
    <= 0 indicates error.


    Copyright (c) 1999-2004 RSA Security Inc. All rights reserved. 050-001001-2600-000-000 - 2.6