diff options
| author | jsing <> | 2014-05-31 16:45:53 +0000 | 
|---|---|---|
| committer | jsing <> | 2014-05-31 16:45:53 +0000 | 
| commit | 54575e9a5c156ef627d86b121a73d48b498ac352 (patch) | |
| tree | 766ff3bde6a2c4f9400ec8a0d7455975e07d2ddc /src/lib/libssl/ssl_lib.c | |
| parent | 2e095c059a16c4644dd1bba604bd92bcdb683046 (diff) | |
| download | openbsd-54575e9a5c156ef627d86b121a73d48b498ac352.tar.gz openbsd-54575e9a5c156ef627d86b121a73d48b498ac352.tar.bz2 openbsd-54575e9a5c156ef627d86b121a73d48b498ac352.zip | |
Some KNF and fix the vairable spelling.
Diffstat (limited to 'src/lib/libssl/ssl_lib.c')
| -rw-r--r-- | src/lib/libssl/ssl_lib.c | 39 | 
1 files changed, 16 insertions, 23 deletions
| diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 293292f1c3..7feb920ab8 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
| @@ -2853,8 +2853,7 @@ SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, | |||
| 2853 | } | 2853 | } | 
| 2854 | 2854 | ||
| 2855 | void | 2855 | void | 
| 2856 | SSL_set_info_callback(SSL *ssl, | 2856 | SSL_set_info_callback(SSL *ssl, void (*cb)(const SSL *ssl, int type, int val)) | 
| 2857 | void (*cb)(const SSL *ssl, int type, int val)) | ||
| 2858 | { | 2857 | { | 
| 2859 | ssl->info_callback = cb; | 2858 | ssl->info_callback = cb; | 
| 2860 | } | 2859 | } | 
| @@ -2955,17 +2954,15 @@ SSL_want(const SSL *s) | |||
| 2955 | } | 2954 | } | 
| 2956 | 2955 | ||
| 2957 | void | 2956 | void | 
| 2958 | SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx, RSA *(*cb)(SSL *ssl, | 2957 | SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx, RSA *(*cb)(SSL *ssl, int is_export, | 
| 2959 | int is_export, | 2958 | int keylength)) | 
| 2960 | int keylength)) | ||
| 2961 | { | 2959 | { | 
| 2962 | SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_TMP_RSA_CB,(void (*)(void))cb); | 2960 | SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_TMP_RSA_CB,(void (*)(void))cb); | 
| 2963 | } | 2961 | } | 
| 2964 | 2962 | ||
| 2965 | void | 2963 | void | 
| 2966 | SSL_set_tmp_rsa_callback(SSL *ssl, RSA *(*cb)(SSL *ssl, | 2964 | SSL_set_tmp_rsa_callback(SSL *ssl, RSA *(*cb)(SSL *ssl, int is_export, | 
| 2967 | int is_export, | 2965 | int keylength)) | 
| 2968 | int keylength)) | ||
| 2969 | { | 2966 | { | 
| 2970 | SSL_callback_ctrl(ssl, SSL_CTRL_SET_TMP_RSA_CB,(void (*)(void))cb); | 2967 | SSL_callback_ctrl(ssl, SSL_CTRL_SET_TMP_RSA_CB,(void (*)(void))cb); | 
| 2971 | } | 2968 | } | 
| @@ -3061,35 +3058,31 @@ SSL_get_psk_identity(const SSL *s) | |||
| 3061 | } | 3058 | } | 
| 3062 | 3059 | ||
| 3063 | void | 3060 | void | 
| 3064 | SSL_set_psk_client_callback(SSL *s, | 3061 | SSL_set_psk_client_callback(SSL *s, unsigned int (*cb)(SSL *ssl, | 
| 3065 | unsigned int (*cb)(SSL *ssl, const char *hint, | 3062 | const char *hint, char *identity, unsigned int max_identity_len, | 
| 3066 | char *identity, unsigned int max_identity_len, unsigned char *psk, | 3063 | unsigned char *psk, unsigned int max_psk_len)) | 
| 3067 | unsigned int max_psk_len)) | ||
| 3068 | { | 3064 | { | 
| 3069 | s->psk_client_callback = cb; | 3065 | s->psk_client_callback = cb; | 
| 3070 | } | 3066 | } | 
| 3071 | 3067 | ||
| 3072 | void | 3068 | void | 
| 3073 | SSL_CTX_set_psk_client_callback(SSL_CTX *ctx, | 3069 | SSL_CTX_set_psk_client_callback(SSL_CTX *ctx, unsigned int (*cb)(SSL *ssl, | 
| 3074 | unsigned int (*cb)(SSL *ssl, const char *hint, | 3070 | const char *hint, char *identity, unsigned int max_identity_len, | 
| 3075 | char *identity, unsigned int max_identity_len, unsigned char *psk, | 3071 | unsigned char *psk, unsigned int max_psk_len)) | 
| 3076 | unsigned int max_psk_len)) | ||
| 3077 | { | 3072 | { | 
| 3078 | ctx->psk_client_callback = cb; | 3073 | ctx->psk_client_callback = cb; | 
| 3079 | } | 3074 | } | 
| 3080 | 3075 | ||
| 3081 | void | 3076 | void | 
| 3082 | SSL_set_psk_server_callback(SSL *s, | 3077 | SSL_set_psk_server_callback(SSL *s, unsigned int (*cb)(SSL *ssl, | 
| 3083 | unsigned int (*cb)(SSL *ssl, const char *identity, | 3078 | const char *identity, unsigned char *psk, unsigned int max_psk_len)) | 
| 3084 | unsigned char *psk, unsigned int max_psk_len)) | ||
| 3085 | { | 3079 | { | 
| 3086 | s->psk_server_callback = cb; | 3080 | s->psk_server_callback = cb; | 
| 3087 | } | 3081 | } | 
| 3088 | 3082 | ||
| 3089 | void | 3083 | void | 
| 3090 | SSL_CTX_set_psk_server_callback(SSL_CTX *ctx, | 3084 | SSL_CTX_set_psk_server_callback(SSL_CTX *ctx, unsigned int (*cb)(SSL *ssl, | 
| 3091 | unsigned int (*cb)(SSL *ssl, const char *identity, | 3085 | const char *identity, unsigned char *psk, unsigned int max_psk_len)) | 
| 3092 | unsigned char *psk, unsigned int max_psk_len)) | ||
| 3093 | { | 3086 | { | 
| 3094 | ctx->psk_server_callback = cb; | 3087 | ctx->psk_server_callback = cb; | 
| 3095 | } | 3088 | } | 
| @@ -3112,7 +3105,7 @@ SSL_set_msg_callback(SSL *ssl, void (*cb)(int write_p, int version, | |||
| 3112 | 3105 | ||
| 3113 | /* | 3106 | /* | 
| 3114 | * Allocates new EVP_MD_CTX and sets pointer to it into given pointer | 3107 | * Allocates new EVP_MD_CTX and sets pointer to it into given pointer | 
| 3115 | * vairable, freeing EVP_MD_CTX previously stored in that variable, if | 3108 | * variable, freeing EVP_MD_CTX previously stored in that variable, if | 
| 3116 | * any. If EVP_MD pointer is passed, initializes ctx with this md | 3109 | * any. If EVP_MD pointer is passed, initializes ctx with this md | 
| 3117 | * Returns newly allocated ctx; | 3110 | * Returns newly allocated ctx; | 
| 3118 | */ | 3111 | */ | 
