• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/wpa_supplicant/src/tls/

Lines Matching refs:rl

26  * @rl: Pointer to TLS record layer data
35 int tlsv1_record_set_cipher_suite(struct tlsv1_record_layer *rl,
43 rl->cipher_suite = cipher_suite;
50 rl->hash_alg = CRYPTO_HASH_ALG_HMAC_MD5;
51 rl->hash_size = MD5_MAC_LEN;
53 rl->hash_alg = CRYPTO_HASH_ALG_HMAC_SHA1;
54 rl->hash_size = SHA1_MAC_LEN;
61 rl->key_material_len = data->key_material;
62 rl->iv_size = data->block_size;
63 rl->cipher_alg = data->alg;
71 * @rl: Pointer to TLS record layer data
77 int tlsv1_record_change_write_cipher(struct tlsv1_record_layer *rl)
80 "0x%04x", rl->cipher_suite);
81 rl->write_cipher_suite = rl->cipher_suite;
82 os_memset(rl->write_seq_num, 0, TLS_SEQ_NUM_LEN);
84 if (rl->write_cbc) {
85 crypto_cipher_deinit(rl->write_cbc);
86 rl->write_cbc = NULL;
88 if (rl->cipher_alg != CRYPTO_CIPHER_NULL) {
89 rl->write_cbc = crypto_cipher_init(rl->cipher_alg,
90 rl->write_iv, rl->write_key,
91 rl->key_material_len);
92 if (rl->write_cbc == NULL) {
105 * @rl: Pointer to TLS record layer data
111 int tlsv1_record_change_read_cipher(struct tlsv1_record_layer *rl)
114 "0x%04x", rl->cipher_suite);
115 rl->read_cipher_suite = rl->cipher_suite;
116 os_memset(rl->read_seq_num, 0, TLS_SEQ_NUM_LEN);
118 if (rl->read_cbc) {
119 crypto_cipher_deinit(rl->read_cbc);
120 rl->read_cbc = NULL;
122 if (rl->cipher_alg != CRYPTO_CIPHER_NULL) {
123 rl->read_cbc = crypto_cipher_init(rl->cipher_alg,
124 rl->read_iv, rl->read_key,
125 rl->key_material_len);
126 if (rl->read_cbc == NULL) {
139 * @rl: Pointer to TLS record layer data
152 int tlsv1_record_send(struct tlsv1_record_layer *rl, u8 content_type, u8 *buf,
175 if (rl->write_cipher_suite != TLS_NULL_WITH_NULL_NULL) {
176 hmac = crypto_hash_init(rl->hash_alg, rl->write_mac_secret,
177 rl->hash_size);
183 crypto_hash_update(hmac, rl->write_seq_num, TLS_SEQ_NUM_LEN);
187 if (clen < rl->hash_size) {
202 if (rl->iv_size) {
205 pad = (len + 1) % rl->iv_size;
207 pad = rl->iv_size - pad;
217 if (crypto_cipher_encrypt(rl->write_cbc, payload,
223 inc_byte_array(rl->write_seq_num, TLS_SEQ_NUM_LEN);
233 * @rl: Pointer to TLS record layer data
245 int tlsv1_record_receive(struct tlsv1_record_layer *rl,
318 if (rl->read_cipher_suite != TLS_NULL_WITH_NULL_NULL) {
319 if (crypto_cipher_decrypt(rl->read_cbc, out_data,
324 if (rl->iv_size) {
359 if (*out_len < rl->hash_size) {
366 *out_len -= rl->hash_size;
368 hmac = crypto_hash_init(rl->hash_alg, rl->read_mac_secret,
369 rl->hash_size);
377 crypto_hash_update(hmac, rl->read_seq_num, TLS_SEQ_NUM_LEN);
389 if (hlen != rl->hash_size ||
406 inc_byte_array(rl->read_seq_num, TLS_SEQ_NUM_LEN);