diff options
author | jsing <> | 2014-05-24 16:06:28 +0000 |
---|---|---|
committer | jsing <> | 2014-05-24 16:06:28 +0000 |
commit | f8d66c98078c32bb4ba6a1c634de09f97f438e28 (patch) | |
tree | 8481e7a43fecd73b7b06d84460a78f0bd65b4f91 /src | |
parent | f58af64a13c833e01a6ff4fce609b64645f00c7b (diff) | |
download | openbsd-f8d66c98078c32bb4ba6a1c634de09f97f438e28.tar.gz openbsd-f8d66c98078c32bb4ba6a1c634de09f97f438e28.tar.bz2 openbsd-f8d66c98078c32bb4ba6a1c634de09f97f438e28.zip |
Use C99 initialisers for SSL3_ENC_METHOD structs.
ok miod@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libssl/d1_lib.c | 26 | ||||
-rw-r--r-- | src/lib/libssl/s3_lib.c | 30 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/d1_lib.c | 26 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/s3_lib.c | 30 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/ssl_lib.c | 35 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/t1_lib.c | 26 | ||||
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 35 | ||||
-rw-r--r-- | src/lib/libssl/t1_lib.c | 26 |
8 files changed, 126 insertions, 108 deletions
diff --git a/src/lib/libssl/d1_lib.c b/src/lib/libssl/d1_lib.c index a2500ee0bf..199653624c 100644 --- a/src/lib/libssl/d1_lib.c +++ b/src/lib/libssl/d1_lib.c | |||
@@ -72,18 +72,20 @@ const char dtls1_version_str[]="DTLSv1" OPENSSL_VERSION_PTEXT; | |||
72 | int dtls1_listen(SSL *s, struct sockaddr *client); | 72 | int dtls1_listen(SSL *s, struct sockaddr *client); |
73 | 73 | ||
74 | SSL3_ENC_METHOD DTLSv1_enc_data = { | 74 | SSL3_ENC_METHOD DTLSv1_enc_data = { |
75 | dtls1_enc, | 75 | .enc = dtls1_enc, |
76 | tls1_mac, | 76 | .mac = tls1_mac, |
77 | tls1_setup_key_block, | 77 | .setup_key_block = tls1_setup_key_block, |
78 | tls1_generate_master_secret, | 78 | .generate_master_secret = tls1_generate_master_secret, |
79 | tls1_change_cipher_state, | 79 | .change_cipher_state = tls1_change_cipher_state, |
80 | tls1_final_finish_mac, | 80 | .final_finish_mac = tls1_final_finish_mac, |
81 | TLS1_FINISH_MAC_LENGTH, | 81 | .finish_mac_length = TLS1_FINISH_MAC_LENGTH, |
82 | tls1_cert_verify_mac, | 82 | .cert_verify_mac = tls1_cert_verify_mac, |
83 | TLS_MD_CLIENT_FINISH_CONST, TLS_MD_CLIENT_FINISH_CONST_SIZE, | 83 | .client_finished_label = TLS_MD_CLIENT_FINISH_CONST, |
84 | TLS_MD_SERVER_FINISH_CONST, TLS_MD_SERVER_FINISH_CONST_SIZE, | 84 | .client_finished_label_len = TLS_MD_CLIENT_FINISH_CONST_SIZE, |
85 | tls1_alert_code, | 85 | .server_finished_label = TLS_MD_SERVER_FINISH_CONST, |
86 | tls1_export_keying_material, | 86 | .server_finished_label_len = TLS_MD_SERVER_FINISH_CONST_SIZE, |
87 | .alert_value = tls1_alert_code, | ||
88 | .export_keying_material = tls1_export_keying_material, | ||
87 | }; | 89 | }; |
88 | 90 | ||
89 | long | 91 | long |
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c index f14cbd0c99..1a0bb5195d 100644 --- a/src/lib/libssl/s3_lib.c +++ b/src/lib/libssl/s3_lib.c | |||
@@ -2254,20 +2254,22 @@ SSL_CIPHER ssl3_ciphers[] = { | |||
2254 | }; | 2254 | }; |
2255 | 2255 | ||
2256 | SSL3_ENC_METHOD SSLv3_enc_data = { | 2256 | SSL3_ENC_METHOD SSLv3_enc_data = { |
2257 | ssl3_enc, | 2257 | .enc = ssl3_enc, |
2258 | n_ssl3_mac, | 2258 | .mac = n_ssl3_mac, |
2259 | ssl3_setup_key_block, | 2259 | .setup_key_block = ssl3_setup_key_block, |
2260 | ssl3_generate_master_secret, | 2260 | .generate_master_secret = ssl3_generate_master_secret, |
2261 | ssl3_change_cipher_state, | 2261 | .change_cipher_state = ssl3_change_cipher_state, |
2262 | ssl3_final_finish_mac, | 2262 | .final_finish_mac = ssl3_final_finish_mac, |
2263 | MD5_DIGEST_LENGTH + SHA_DIGEST_LENGTH, | 2263 | .finish_mac_length = MD5_DIGEST_LENGTH + SHA_DIGEST_LENGTH, |
2264 | ssl3_cert_verify_mac, | 2264 | .cert_verify_mac = ssl3_cert_verify_mac, |
2265 | SSL3_MD_CLIENT_FINISHED_CONST, 4, | 2265 | .client_finished_label = SSL3_MD_CLIENT_FINISHED_CONST, |
2266 | SSL3_MD_SERVER_FINISHED_CONST, 4, | 2266 | .client_finished_label_len = 4, |
2267 | ssl3_alert_code, | 2267 | .server_finished_label = SSL3_MD_SERVER_FINISHED_CONST, |
2268 | (int (*)(SSL *, unsigned char *, size_t, const char *, | 2268 | .server_finished_label_len = 4, |
2269 | size_t, const unsigned char *, size_t, | 2269 | .alert_value = ssl3_alert_code, |
2270 | int use_context))ssl_undefined_function, | 2270 | .export_keying_material = (int (*)(SSL *, unsigned char *, size_t, |
2271 | const char *, size_t, const unsigned char *, size_t, | ||
2272 | int use_context))ssl_undefined_function, | ||
2271 | }; | 2273 | }; |
2272 | 2274 | ||
2273 | long | 2275 | long |
diff --git a/src/lib/libssl/src/ssl/d1_lib.c b/src/lib/libssl/src/ssl/d1_lib.c index a2500ee0bf..199653624c 100644 --- a/src/lib/libssl/src/ssl/d1_lib.c +++ b/src/lib/libssl/src/ssl/d1_lib.c | |||
@@ -72,18 +72,20 @@ const char dtls1_version_str[]="DTLSv1" OPENSSL_VERSION_PTEXT; | |||
72 | int dtls1_listen(SSL *s, struct sockaddr *client); | 72 | int dtls1_listen(SSL *s, struct sockaddr *client); |
73 | 73 | ||
74 | SSL3_ENC_METHOD DTLSv1_enc_data = { | 74 | SSL3_ENC_METHOD DTLSv1_enc_data = { |
75 | dtls1_enc, | 75 | .enc = dtls1_enc, |
76 | tls1_mac, | 76 | .mac = tls1_mac, |
77 | tls1_setup_key_block, | 77 | .setup_key_block = tls1_setup_key_block, |
78 | tls1_generate_master_secret, | 78 | .generate_master_secret = tls1_generate_master_secret, |
79 | tls1_change_cipher_state, | 79 | .change_cipher_state = tls1_change_cipher_state, |
80 | tls1_final_finish_mac, | 80 | .final_finish_mac = tls1_final_finish_mac, |
81 | TLS1_FINISH_MAC_LENGTH, | 81 | .finish_mac_length = TLS1_FINISH_MAC_LENGTH, |
82 | tls1_cert_verify_mac, | 82 | .cert_verify_mac = tls1_cert_verify_mac, |
83 | TLS_MD_CLIENT_FINISH_CONST, TLS_MD_CLIENT_FINISH_CONST_SIZE, | 83 | .client_finished_label = TLS_MD_CLIENT_FINISH_CONST, |
84 | TLS_MD_SERVER_FINISH_CONST, TLS_MD_SERVER_FINISH_CONST_SIZE, | 84 | .client_finished_label_len = TLS_MD_CLIENT_FINISH_CONST_SIZE, |
85 | tls1_alert_code, | 85 | .server_finished_label = TLS_MD_SERVER_FINISH_CONST, |
86 | tls1_export_keying_material, | 86 | .server_finished_label_len = TLS_MD_SERVER_FINISH_CONST_SIZE, |
87 | .alert_value = tls1_alert_code, | ||
88 | .export_keying_material = tls1_export_keying_material, | ||
87 | }; | 89 | }; |
88 | 90 | ||
89 | long | 91 | long |
diff --git a/src/lib/libssl/src/ssl/s3_lib.c b/src/lib/libssl/src/ssl/s3_lib.c index f14cbd0c99..1a0bb5195d 100644 --- a/src/lib/libssl/src/ssl/s3_lib.c +++ b/src/lib/libssl/src/ssl/s3_lib.c | |||
@@ -2254,20 +2254,22 @@ SSL_CIPHER ssl3_ciphers[] = { | |||
2254 | }; | 2254 | }; |
2255 | 2255 | ||
2256 | SSL3_ENC_METHOD SSLv3_enc_data = { | 2256 | SSL3_ENC_METHOD SSLv3_enc_data = { |
2257 | ssl3_enc, | 2257 | .enc = ssl3_enc, |
2258 | n_ssl3_mac, | 2258 | .mac = n_ssl3_mac, |
2259 | ssl3_setup_key_block, | 2259 | .setup_key_block = ssl3_setup_key_block, |
2260 | ssl3_generate_master_secret, | 2260 | .generate_master_secret = ssl3_generate_master_secret, |
2261 | ssl3_change_cipher_state, | 2261 | .change_cipher_state = ssl3_change_cipher_state, |
2262 | ssl3_final_finish_mac, | 2262 | .final_finish_mac = ssl3_final_finish_mac, |
2263 | MD5_DIGEST_LENGTH + SHA_DIGEST_LENGTH, | 2263 | .finish_mac_length = MD5_DIGEST_LENGTH + SHA_DIGEST_LENGTH, |
2264 | ssl3_cert_verify_mac, | 2264 | .cert_verify_mac = ssl3_cert_verify_mac, |
2265 | SSL3_MD_CLIENT_FINISHED_CONST, 4, | 2265 | .client_finished_label = SSL3_MD_CLIENT_FINISHED_CONST, |
2266 | SSL3_MD_SERVER_FINISHED_CONST, 4, | 2266 | .client_finished_label_len = 4, |
2267 | ssl3_alert_code, | 2267 | .server_finished_label = SSL3_MD_SERVER_FINISHED_CONST, |
2268 | (int (*)(SSL *, unsigned char *, size_t, const char *, | 2268 | .server_finished_label_len = 4, |
2269 | size_t, const unsigned char *, size_t, | 2269 | .alert_value = ssl3_alert_code, |
2270 | int use_context))ssl_undefined_function, | 2270 | .export_keying_material = (int (*)(SSL *, unsigned char *, size_t, |
2271 | const char *, size_t, const unsigned char *, size_t, | ||
2272 | int use_context))ssl_undefined_function, | ||
2271 | }; | 2273 | }; |
2272 | 2274 | ||
2273 | long | 2275 | long |
diff --git a/src/lib/libssl/src/ssl/ssl_lib.c b/src/lib/libssl/src/ssl/ssl_lib.c index 847fb79f6e..c2e6b407c5 100644 --- a/src/lib/libssl/src/ssl/ssl_lib.c +++ b/src/lib/libssl/src/ssl/ssl_lib.c | |||
@@ -163,22 +163,25 @@ SSL3_ENC_METHOD ssl3_undef_enc_method = { | |||
163 | * Evil casts, but these functions are only called if there's a | 163 | * Evil casts, but these functions are only called if there's a |
164 | * library bug. | 164 | * library bug. |
165 | */ | 165 | */ |
166 | (int (*)(SSL *, int))ssl_undefined_function, | 166 | .enc = (int (*)(SSL *, int))ssl_undefined_function, |
167 | (int (*)(SSL *, unsigned char *, int))ssl_undefined_function, | 167 | .mac = (int (*)(SSL *, unsigned char *, int))ssl_undefined_function, |
168 | ssl_undefined_function, | 168 | .setup_key_block = ssl_undefined_function, |
169 | (int (*)(SSL *, unsigned char *, unsigned char *, int))ssl_undefined_function, | 169 | .generate_master_secret = (int (*)(SSL *, unsigned char *, |
170 | (int (*)(SSL*, int))ssl_undefined_function, | 170 | unsigned char *, int))ssl_undefined_function, |
171 | (int (*)(SSL *, const char*, int, unsigned char *))ssl_undefined_function, | 171 | .change_cipher_state = (int (*)(SSL*, int))ssl_undefined_function, |
172 | 0, /* finish_mac_length */ | 172 | .final_finish_mac = (int (*)(SSL *, const char*, int, |
173 | (int (*)(SSL *, int, unsigned char *))ssl_undefined_function, | 173 | unsigned char *))ssl_undefined_function, |
174 | NULL, /* client_finished_label */ | 174 | .finish_mac_length = 0, |
175 | 0, /* client_finished_label_len */ | 175 | .cert_verify_mac = (int (*)(SSL *, int, |
176 | NULL, /* server_finished_label */ | 176 | unsigned char *))ssl_undefined_function, |
177 | 0, /* server_finished_label_len */ | 177 | .client_finished_label = NULL, |
178 | (int (*)(int))ssl_undefined_function, | 178 | .client_finished_label_len = 0, |
179 | (int (*)(SSL *, unsigned char *, size_t, const char *, | 179 | .server_finished_label = NULL, |
180 | size_t, const unsigned char *, size_t, | 180 | .server_finished_label_len = 0, |
181 | int use_context)) ssl_undefined_function, | 181 | .alert_value = (int (*)(int))ssl_undefined_function, |
182 | .export_keying_material = (int (*)(SSL *, unsigned char *, size_t, | ||
183 | const char *, size_t, const unsigned char *, size_t, | ||
184 | int use_context))ssl_undefined_function, | ||
182 | }; | 185 | }; |
183 | 186 | ||
184 | int | 187 | int |
diff --git a/src/lib/libssl/src/ssl/t1_lib.c b/src/lib/libssl/src/ssl/t1_lib.c index 63537888ae..0ea9ce752d 100644 --- a/src/lib/libssl/src/ssl/t1_lib.c +++ b/src/lib/libssl/src/ssl/t1_lib.c | |||
@@ -126,18 +126,20 @@ static int tls_decrypt_ticket(SSL *s, const unsigned char *tick, int ticklen, | |||
126 | #endif | 126 | #endif |
127 | 127 | ||
128 | SSL3_ENC_METHOD TLSv1_enc_data = { | 128 | SSL3_ENC_METHOD TLSv1_enc_data = { |
129 | tls1_enc, | 129 | .enc = tls1_enc, |
130 | tls1_mac, | 130 | .mac = tls1_mac, |
131 | tls1_setup_key_block, | 131 | .setup_key_block = tls1_setup_key_block, |
132 | tls1_generate_master_secret, | 132 | .generate_master_secret = tls1_generate_master_secret, |
133 | tls1_change_cipher_state, | 133 | .change_cipher_state = tls1_change_cipher_state, |
134 | tls1_final_finish_mac, | 134 | .final_finish_mac = tls1_final_finish_mac, |
135 | TLS1_FINISH_MAC_LENGTH, | 135 | .finish_mac_length = TLS1_FINISH_MAC_LENGTH, |
136 | tls1_cert_verify_mac, | 136 | .cert_verify_mac = tls1_cert_verify_mac, |
137 | TLS_MD_CLIENT_FINISH_CONST, TLS_MD_CLIENT_FINISH_CONST_SIZE, | 137 | .client_finished_label = TLS_MD_CLIENT_FINISH_CONST, |
138 | TLS_MD_SERVER_FINISH_CONST, TLS_MD_SERVER_FINISH_CONST_SIZE, | 138 | .client_finished_label_len = TLS_MD_CLIENT_FINISH_CONST_SIZE, |
139 | tls1_alert_code, | 139 | .server_finished_label = TLS_MD_SERVER_FINISH_CONST, |
140 | tls1_export_keying_material, | 140 | .server_finished_label_len = TLS_MD_SERVER_FINISH_CONST_SIZE, |
141 | .alert_value = tls1_alert_code, | ||
142 | .export_keying_material = tls1_export_keying_material, | ||
141 | }; | 143 | }; |
142 | 144 | ||
143 | long | 145 | long |
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 847fb79f6e..c2e6b407c5 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
@@ -163,22 +163,25 @@ SSL3_ENC_METHOD ssl3_undef_enc_method = { | |||
163 | * Evil casts, but these functions are only called if there's a | 163 | * Evil casts, but these functions are only called if there's a |
164 | * library bug. | 164 | * library bug. |
165 | */ | 165 | */ |
166 | (int (*)(SSL *, int))ssl_undefined_function, | 166 | .enc = (int (*)(SSL *, int))ssl_undefined_function, |
167 | (int (*)(SSL *, unsigned char *, int))ssl_undefined_function, | 167 | .mac = (int (*)(SSL *, unsigned char *, int))ssl_undefined_function, |
168 | ssl_undefined_function, | 168 | .setup_key_block = ssl_undefined_function, |
169 | (int (*)(SSL *, unsigned char *, unsigned char *, int))ssl_undefined_function, | 169 | .generate_master_secret = (int (*)(SSL *, unsigned char *, |
170 | (int (*)(SSL*, int))ssl_undefined_function, | 170 | unsigned char *, int))ssl_undefined_function, |
171 | (int (*)(SSL *, const char*, int, unsigned char *))ssl_undefined_function, | 171 | .change_cipher_state = (int (*)(SSL*, int))ssl_undefined_function, |
172 | 0, /* finish_mac_length */ | 172 | .final_finish_mac = (int (*)(SSL *, const char*, int, |
173 | (int (*)(SSL *, int, unsigned char *))ssl_undefined_function, | 173 | unsigned char *))ssl_undefined_function, |
174 | NULL, /* client_finished_label */ | 174 | .finish_mac_length = 0, |
175 | 0, /* client_finished_label_len */ | 175 | .cert_verify_mac = (int (*)(SSL *, int, |
176 | NULL, /* server_finished_label */ | 176 | unsigned char *))ssl_undefined_function, |
177 | 0, /* server_finished_label_len */ | 177 | .client_finished_label = NULL, |
178 | (int (*)(int))ssl_undefined_function, | 178 | .client_finished_label_len = 0, |
179 | (int (*)(SSL *, unsigned char *, size_t, const char *, | 179 | .server_finished_label = NULL, |
180 | size_t, const unsigned char *, size_t, | 180 | .server_finished_label_len = 0, |
181 | int use_context)) ssl_undefined_function, | 181 | .alert_value = (int (*)(int))ssl_undefined_function, |
182 | .export_keying_material = (int (*)(SSL *, unsigned char *, size_t, | ||
183 | const char *, size_t, const unsigned char *, size_t, | ||
184 | int use_context))ssl_undefined_function, | ||
182 | }; | 185 | }; |
183 | 186 | ||
184 | int | 187 | int |
diff --git a/src/lib/libssl/t1_lib.c b/src/lib/libssl/t1_lib.c index 63537888ae..0ea9ce752d 100644 --- a/src/lib/libssl/t1_lib.c +++ b/src/lib/libssl/t1_lib.c | |||
@@ -126,18 +126,20 @@ static int tls_decrypt_ticket(SSL *s, const unsigned char *tick, int ticklen, | |||
126 | #endif | 126 | #endif |
127 | 127 | ||
128 | SSL3_ENC_METHOD TLSv1_enc_data = { | 128 | SSL3_ENC_METHOD TLSv1_enc_data = { |
129 | tls1_enc, | 129 | .enc = tls1_enc, |
130 | tls1_mac, | 130 | .mac = tls1_mac, |
131 | tls1_setup_key_block, | 131 | .setup_key_block = tls1_setup_key_block, |
132 | tls1_generate_master_secret, | 132 | .generate_master_secret = tls1_generate_master_secret, |
133 | tls1_change_cipher_state, | 133 | .change_cipher_state = tls1_change_cipher_state, |
134 | tls1_final_finish_mac, | 134 | .final_finish_mac = tls1_final_finish_mac, |
135 | TLS1_FINISH_MAC_LENGTH, | 135 | .finish_mac_length = TLS1_FINISH_MAC_LENGTH, |
136 | tls1_cert_verify_mac, | 136 | .cert_verify_mac = tls1_cert_verify_mac, |
137 | TLS_MD_CLIENT_FINISH_CONST, TLS_MD_CLIENT_FINISH_CONST_SIZE, | 137 | .client_finished_label = TLS_MD_CLIENT_FINISH_CONST, |
138 | TLS_MD_SERVER_FINISH_CONST, TLS_MD_SERVER_FINISH_CONST_SIZE, | 138 | .client_finished_label_len = TLS_MD_CLIENT_FINISH_CONST_SIZE, |
139 | tls1_alert_code, | 139 | .server_finished_label = TLS_MD_SERVER_FINISH_CONST, |
140 | tls1_export_keying_material, | 140 | .server_finished_label_len = TLS_MD_SERVER_FINISH_CONST_SIZE, |
141 | .alert_value = tls1_alert_code, | ||
142 | .export_keying_material = tls1_export_keying_material, | ||
141 | }; | 143 | }; |
142 | 144 | ||
143 | long | 145 | long |