|
@@ -2328,6 +2328,21 @@ static int tls_newdata_process_data ( struct tls_session *tls ) {
|
2328
|
2328
|
return 0;
|
2329
|
2329
|
}
|
2330
|
2330
|
|
|
2331
|
+/**
|
|
2332
|
+ * Check flow control window
|
|
2333
|
+ *
|
|
2334
|
+ * @v tls TLS session
|
|
2335
|
+ * @ret len Length of window
|
|
2336
|
+ */
|
|
2337
|
+static size_t tls_cipherstream_window ( struct tls_session *tls ) {
|
|
2338
|
+
|
|
2339
|
+ /* Open window until we are ready to accept data */
|
|
2340
|
+ if ( ! tls_ready ( tls ) )
|
|
2341
|
+ return -1UL;
|
|
2342
|
+
|
|
2343
|
+ return xfer_window ( &tls->plainstream );
|
|
2344
|
+}
|
|
2345
|
+
|
2331
|
2346
|
/**
|
2332
|
2347
|
* Receive new ciphertext
|
2333
|
2348
|
*
|
|
@@ -2390,6 +2405,7 @@ static int tls_cipherstream_deliver ( struct tls_session *tls,
|
2390
|
2405
|
static struct interface_operation tls_cipherstream_ops[] = {
|
2391
|
2406
|
INTF_OP ( xfer_deliver, struct tls_session *,
|
2392
|
2407
|
tls_cipherstream_deliver ),
|
|
2408
|
+ INTF_OP ( xfer_window, struct tls_session *, tls_cipherstream_window ),
|
2393
|
2409
|
INTF_OP ( xfer_window_changed, struct tls_session *, tls_tx_resume ),
|
2394
|
2410
|
INTF_OP ( intf_close, struct tls_session *, tls_close ),
|
2395
|
2411
|
};
|