RSA BSAFE Micro Edition Suite

Streamlined security for mobile and embedded devices

Search  Print

Temporary Key Functions

This section describes the functions which generate temporary keys.

Typedefs

typedef RSA* R_CDECL SSL_TMP_RSA_CB_T (SSL *ssl, int export_type)
 A type of callback function that helps delay temporary RSA key creation. More...


Typedef Documentation

typedef RSA* R_CDECL SSL_TMP_RSA_CB_T(SSL *ssl, int export_type)
 

A type of callback function that helps delay temporary RSA key creation. This RSA callback is used by the server before a server key exchange message to generate a temporary RSA key in the case where the original server key cannot be used to encrypt the pre-master secret (export restrictions do not allow it, key was for signing only, etc). The generated key must be in the RSA key structure The callback is only run to generate the key if the handshake requires it. The server key exchange code checks for an existing temporary RSA key of the correct size before attempting to generate a new key. Once the callback runs successfully the result is assigned as the key to be used for all future handshakes of that SSL that require it. It does mean that the first handshake that requires a temporary key will take the extra time to generate the key which can be a bit of a distraction.

Parameters:
ssl [In, Out] A reference to the SSL connection.
export_type [In] Can be set to inform the callback that an export size key is required. If the flag is "1" then a 512-bit RSA must be generated. Otherwise (flag is "2"), a 1024-bit RSA key must be generated.
Returns:
A reference to a new RSA key.
See also:
SSL_CTX_set_tmp_rsa_cb() and SSL_CTX_set_tmp_rsa().


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