linux-user: Add support for setsockopt() option SOL_ALG
authorYunqiang Su <ysu@wavecomp.com>
Wed, 19 Jun 2019 14:17:11 +0000 (16:17 +0200)
committerLaurent Vivier <laurent@vivier.eu>
Mon, 24 Jun 2019 20:59:14 +0000 (22:59 +0200)
commitf31dddd2fc0a9cd40cdb9203662f75a785220268
tree1734044748db06e213814a255850c00b2b8e053b
parent524fa3408ed745a2fed0642fb0d92c934d10ff64
linux-user: Add support for setsockopt() option SOL_ALG

Add support for options SOL_ALG of the syscall setsockopt(). This
option is used in relation to Linux kernel Crypto API, and allows
a user to set additional information for the cipher operation via
syscall setsockopt(). The field "optname" must be one of the
following:

  - ALG_SET_KEY – seting the key
  - ALG_SET_AEAD_AUTHSIZE – set the authentication tag size

SOL_ALG is relatively newer setsockopt() option. Therefore, the
code that handles SOL_ALG is enclosed in "ifdef" so that the build
does not fail for older kernels that do not contain support for
SOL_ALG. "ifdef" also contains check if ALG_SET_KEY and
ALG_SET_AEAD_AUTHSIZE are defined.

Signed-off-by: Yunqiang Su <ysu@wavecomp.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <1560953834-29584-3-git-send-email-aleksandar.markovic@rt-rk.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/syscall.c