RSA BSAFE Micro Edition Suite

Streamlined security for mobile and embedded devices

Search  Print

SSL_METHOD Reference

This structure specifies a set of function pointers for implementing SSL version-specific functionality.

This functionality determines which SSL protocol versions are included at run-time and during compile time.

SSL supports individual methods for TLSv1 and SSLv3. Refer to TLSv1 and SSLv3 protocols for further information.

The following methods are currently supported:

See also:
SSLv3_method() SSLv3_server_method(), SSLv3_client_method(), TLSv1_method(), TLSv1_server_method() and TLSv1_client_method().
Samples:

bio_client.c, bio_server.c, cache_server.c, nbio_client.c, nbio_server.c, p7ssl_client.c, p7ssl_server.c, simple.c, sock_client.c, sock_server.c, ssl_client.c, and ssl_server.c.

#include <sslctx_st.h>

struct ssl_method_st
{
    int version;
    int (*ssl_new)(SSL *ssl);
    void (*ssl_clear)(SSL *ssl);
    void (*ssl_free)(SSL *ssl);
    int (*ssl_accept)(SSL *ssl);
    int (*ssl_connect)(SSL *ssl);
    int (*ssl_read)(SSL *ssl, char *buf, int len);
    int (*ssl_peek)(SSL *ssl, char *buf, int len);
    int (*ssl_write)(SSL *ssl, char *buf, int len);
    int (*ssl_shutdown)(SSL *ssl);
    int (*ssl_renegotiate)(SSL *ssl);
    int (*ssl_renegotiate_check)(SSL *ssl);
    long (*ssl_ctrl)(SSL *ssl, int cmd, long larg, char *parg);
    long (*ssl_ctx_ctrl)(SSL_CTX *ctx, int cmd, long larg, char *parg);
    SSL_CIPHER *(*get_cipher_by_char)(unsigned char *p);
    int (*put_cipher_by_char)(SSL_CIPHER *c, unsigned char *p);
    int (*ssl_pending)(SSL *s);
    int (*num_ciphers)(void);
    SSL_CIPHER *(*get_cipher)(unsigned int u);
    SSL_METHOD *(*get_ssl_method)(int ver);
    long (*get_timeout)(void);
    struct ssl3_enc_method *ssl3_enc; /* Extra SSLv3/TLS stuff */
#if 0
    int (*ssl_version)();
#endif
};

Copyright (c) 1999-2005 RSA Security Inc. All rights reserved. 072-001001-2100-001-000 - 2.1