Skip to content

Pass all key material in one setsockopt(2) call #46

Description

@fridex

There are needed multiple setsockopt(2) calls for passing key material to kernel. It would be nice to consider to introduce one setsockopt(2) call, which would pass needed key material at once to reduce number of context switches.

E.g.:

struct ktls_conf cnf;

// session_* is obtained material from GnuTLS/OpenSSL
cnf.salt_send = session_salt_send;
cnf.salt_recv = session_salt_recv;
cnf.key_send = session_key_send;
cnf.key_recv = session_key_recv;
cnf.iv_send = session_iv_send;
cnf.iv_recv = session_iv_recv;

setsockopt(ksd, AF_KTLS, KTLS_SET_CONF, &cnf, sizeof(cnf));

EDIT: ... and skip NULL fields in struct ktls_conf in kernel.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions