#include <math.h>
-#include "certs.h"
-#include "tls_picotls.h"
-#include "pico_vpp_crypto.h"
+#include <tlspicotls/certs.h>
+#include <tlspicotls/tls_picotls.h>
+#include <tlspicotls/pico_vpp_crypto.h>
picotls_main_t picotls_main;
}
picotls_ctx_t *ptls_ctx = (picotls_ctx_t *) ctx;
ptls_free (ptls_ctx->tls);
- session_transport_closed_notify (&ctx->connection);
+ session_transport_closing_notify (&ctx->connection);
return 0;
}
svm_fifo_enqueue (tls_tx_fifo, to_write, TLS_WRITE_OFFSET (ptls_ctx));
if (to_tls_len < 0)
{
- tls_add_vpp_q_builtin_tx_evt (app_session);
+ app_session->flags |= SESSION_F_CUSTOM_TX;
return 0;
}
ptls_ctx->write_buffer_offset += to_tls_len;
if (TLS_WRITE_IS_LEFT (ptls_ctx))
{
- tls_add_vpp_q_builtin_tx_evt (app_session);
+ app_session->flags |= SESSION_F_CUSTOM_TX;
return to_tls_len;
}
else
if (!deq_max)
return deq_max;
- deq_max = clib_min (deq_max, sp->max_burst_size);
- deq_now = clib_min (deq_max, svm_fifo_max_read_chunk (app_tx_fifo));
+ deq_now = clib_min (deq_max, sp->max_burst_size);
+ deq_now = clib_min (deq_now, svm_fifo_max_read_chunk (app_tx_fifo));
enq_max = svm_fifo_max_enqueue_prod (tls_tx_fifo);
/** There is no engough enqueue space for one record **/
if (ctx->app_closed)
picotls_app_close (ctx);
- return 0;
+ return to_tls_len;
}
static int
vec_validate (pm->ctx_pool, num_threads - 1);
+ clib_rwlock_init (&picotls_main.crypto_keys_rw_lock);
+
tls_register_engine (&picotls_engine, CRYPTO_ENGINE_PICOTLS);
return error;