rename; tls13 traffic keys are constructed in two ways, the name of the function should imply the case being dealt
diff --git a/lib/picotls.c b/lib/picotls.c
index 0d150f5..dec352c 100644
--- a/lib/picotls.c
+++ b/lib/picotls.c
@@ -5142,7 +5142,7 @@
}
}
-static int build_tls12_traffic_protection(ptls_t *tls, int is_enc, const uint8_t **src, const uint8_t *const end)
+static int import_tls12_traffic_protection(ptls_t *tls, int is_enc, const uint8_t **src, const uint8_t *const end)
{
struct st_ptls_traffic_protection_t *tp = is_enc ? &tls->traffic_protection.enc : &tls->traffic_protection.dec;
@@ -5169,7 +5169,7 @@
return 0;
}
-static int build_tls13_traffic_protection(ptls_t *tls, int is_enc, const uint8_t **src, const uint8_t *const end)
+static int import_tls13_traffic_protection(ptls_t *tls, int is_enc, const uint8_t **src, const uint8_t *const end)
{
struct st_ptls_traffic_protection_t *tp = is_enc ? &tls->traffic_protection.enc : &tls->traffic_protection.dec;
@@ -5242,9 +5242,9 @@
goto Exit;
}
/* setup AEAD keys */
- if ((ret = build_tls12_traffic_protection(*tls, 1, &src, end)) != 0)
+ if ((ret = import_tls12_traffic_protection(*tls, 1, &src, end)) != 0)
goto Exit;
- if ((ret = build_tls12_traffic_protection(*tls, 0, &src, end)) != 0)
+ if ((ret = import_tls12_traffic_protection(*tls, 0, &src, end)) != 0)
goto Exit;
break;
case PTLS_PROTOCOL_VERSION_TLS13:
@@ -5259,9 +5259,9 @@
ret = PTLS_ERROR_NO_MEMORY;
goto Exit;
}
- if ((ret = build_tls13_traffic_protection(*tls, 1, &src, end)) != 0)
+ if ((ret = import_tls13_traffic_protection(*tls, 1, &src, end)) != 0)
goto Exit;
- if ((ret = build_tls13_traffic_protection(*tls, 0, &src, end)) != 0)
+ if ((ret = import_tls13_traffic_protection(*tls, 0, &src, end)) != 0)
goto Exit;
(*tls)->state = PTLS_STATE_SERVER_POST_HANDSHAKE;
goto Exit;