qemu-e2k/crypto
Philippe Mathieu-Daudé 69699f3055 crypto/tls-cipher-suites: Produce fw_cfg consumable blob
Since our format is consumable by the fw_cfg device,
we can implement the FW_CFG_DATA_GENERATOR interface.

Example of use to dump the cipher suites (if tracing enabled):

  $ qemu-system-x86_64 -S \
    -object tls-cipher-suites,id=mysuite1,priority=@SYSTEM \
    -fw_cfg name=etc/path/to/ciphers,gen_id=mysuite1 \
    -trace qcrypto\*
  1590664444.197123:qcrypto_tls_cipher_suite_priority priority: @SYSTEM
  1590664444.197219:qcrypto_tls_cipher_suite_info data=[0x13,0x02] version=TLS1.3 name=TLS_AES_256_GCM_SHA384
  1590664444.197228:qcrypto_tls_cipher_suite_info data=[0x13,0x03] version=TLS1.3 name=TLS_CHACHA20_POLY1305_SHA256
  1590664444.197233:qcrypto_tls_cipher_suite_info data=[0x13,0x01] version=TLS1.3 name=TLS_AES_128_GCM_SHA256
  1590664444.197236:qcrypto_tls_cipher_suite_info data=[0x13,0x04] version=TLS1.3 name=TLS_AES_128_CCM_SHA256
  1590664444.197240:qcrypto_tls_cipher_suite_info data=[0xc0,0x30] version=TLS1.2 name=TLS_ECDHE_RSA_AES_256_GCM_SHA384
  1590664444.197245:qcrypto_tls_cipher_suite_info data=[0xcc,0xa8] version=TLS1.2 name=TLS_ECDHE_RSA_CHACHA20_POLY1305
  1590664444.197250:qcrypto_tls_cipher_suite_info data=[0xc0,0x14] version=TLS1.0 name=TLS_ECDHE_RSA_AES_256_CBC_SHA1
  1590664444.197254:qcrypto_tls_cipher_suite_info data=[0xc0,0x2f] version=TLS1.2 name=TLS_ECDHE_RSA_AES_128_GCM_SHA256
  1590664444.197258:qcrypto_tls_cipher_suite_info data=[0xc0,0x13] version=TLS1.0 name=TLS_ECDHE_RSA_AES_128_CBC_SHA1
  1590664444.197261:qcrypto_tls_cipher_suite_info data=[0xc0,0x2c] version=TLS1.2 name=TLS_ECDHE_ECDSA_AES_256_GCM_SHA384
  1590664444.197266:qcrypto_tls_cipher_suite_info data=[0xcc,0xa9] version=TLS1.2 name=TLS_ECDHE_ECDSA_CHACHA20_POLY1305
  1590664444.197270:qcrypto_tls_cipher_suite_info data=[0xc0,0xad] version=TLS1.2 name=TLS_ECDHE_ECDSA_AES_256_CCM
  1590664444.197274:qcrypto_tls_cipher_suite_info data=[0xc0,0x0a] version=TLS1.0 name=TLS_ECDHE_ECDSA_AES_256_CBC_SHA1
  1590664444.197278:qcrypto_tls_cipher_suite_info data=[0xc0,0x2b] version=TLS1.2 name=TLS_ECDHE_ECDSA_AES_128_GCM_SHA256
  1590664444.197283:qcrypto_tls_cipher_suite_info data=[0xc0,0xac] version=TLS1.2 name=TLS_ECDHE_ECDSA_AES_128_CCM
  1590664444.197287:qcrypto_tls_cipher_suite_info data=[0xc0,0x09] version=TLS1.0 name=TLS_ECDHE_ECDSA_AES_128_CBC_SHA1
  1590664444.197291:qcrypto_tls_cipher_suite_info data=[0x00,0x9d] version=TLS1.2 name=TLS_RSA_AES_256_GCM_SHA384
  1590664444.197296:qcrypto_tls_cipher_suite_info data=[0xc0,0x9d] version=TLS1.2 name=TLS_RSA_AES_256_CCM
  1590664444.197300:qcrypto_tls_cipher_suite_info data=[0x00,0x35] version=TLS1.0 name=TLS_RSA_AES_256_CBC_SHA1
  1590664444.197304:qcrypto_tls_cipher_suite_info data=[0x00,0x9c] version=TLS1.2 name=TLS_RSA_AES_128_GCM_SHA256
  1590664444.197308:qcrypto_tls_cipher_suite_info data=[0xc0,0x9c] version=TLS1.2 name=TLS_RSA_AES_128_CCM
  1590664444.197312:qcrypto_tls_cipher_suite_info data=[0x00,0x2f] version=TLS1.0 name=TLS_RSA_AES_128_CBC_SHA1
  1590664444.197316:qcrypto_tls_cipher_suite_info data=[0x00,0x9f] version=TLS1.2 name=TLS_DHE_RSA_AES_256_GCM_SHA384
  1590664444.197320:qcrypto_tls_cipher_suite_info data=[0xcc,0xaa] version=TLS1.2 name=TLS_DHE_RSA_CHACHA20_POLY1305
  1590664444.197325:qcrypto_tls_cipher_suite_info data=[0xc0,0x9f] version=TLS1.2 name=TLS_DHE_RSA_AES_256_CCM
  1590664444.197329:qcrypto_tls_cipher_suite_info data=[0x00,0x39] version=TLS1.0 name=TLS_DHE_RSA_AES_256_CBC_SHA1
  1590664444.197333:qcrypto_tls_cipher_suite_info data=[0x00,0x9e] version=TLS1.2 name=TLS_DHE_RSA_AES_128_GCM_SHA256
  1590664444.197337:qcrypto_tls_cipher_suite_info data=[0xc0,0x9e] version=TLS1.2 name=TLS_DHE_RSA_AES_128_CCM
  1590664444.197341:qcrypto_tls_cipher_suite_info data=[0x00,0x33] version=TLS1.0 name=TLS_DHE_RSA_AES_128_CBC_SHA1
  1590664444.197345:qcrypto_tls_cipher_suite_count count: 29

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20200623172726.21040-6-philmd@redhat.com>
2020-07-03 18:16:01 +02:00
..
Makefile.objs crypto: Add tls-cipher-suites object 2020-07-03 18:16:01 +02:00
aes.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
afalg.c crypto: introduce some common functions for af_alg backend 2017-07-19 10:11:05 +01:00
afalgpriv.h crypto: hash: add afalg-backend hash support 2017-07-19 10:11:05 +01:00
afsplit.c crypto: use auto cleanup for many stack variables 2019-08-22 10:56:57 +01:00
block-luks.c qcrypto-luks: more rigorous header checking 2019-09-26 16:34:02 +01:00
block-luks.h crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
block-qcow.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
block-qcow.h crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
block.c luks: extract qcrypto_block_calculate_payload_offset() 2020-03-11 12:42:29 +01:00
blockpriv.h crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
cipher-afalg.c qapi: Mechanically convert FOO_lookup[...] to FOO_str(...) 2017-09-04 13:09:13 +02:00
cipher-builtin.c crypto: Redundant type conversion for AES_KEY pointer 2020-05-07 12:48:41 +01:00
cipher-gcrypt.c crypto: add support for gcrypt's native XTS impl 2019-10-28 16:20:28 +01:00
cipher-nettle.c crypto: add support for nettle's native XTS impl 2019-10-28 16:45:07 +01:00
cipher.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
cipherpriv.h Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
desrfb.c crypto: finish removing TABs 2019-02-05 16:50:18 +01:00
hash-afalg.c crypto: hmac: add af_alg-backend hmac support 2017-07-19 10:11:05 +01:00
hash-gcrypt.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
hash-glib.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
hash-nettle.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
hash.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
hashpriv.h crypto: hash: add afalg-backend hash support 2017-07-19 10:11:05 +01:00
hmac-gcrypt.c qapi: Mechanically convert FOO_lookup[...] to FOO_str(...) 2017-09-04 13:09:13 +02:00
hmac-glib.c glib: bump min required glib library version to 2.48 2019-08-22 10:46:34 +01:00
hmac-nettle.c crypto: fix function signatures for nettle 2.7 vs 3 2019-07-19 12:48:22 +01:00
hmac.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
hmacpriv.h crypto: hmac: add af_alg-backend hmac support 2017-07-19 10:11:05 +01:00
init.c crypto: Remove use of GCRYPT_VERSION macro. 2020-06-15 11:33:51 +01:00
ivgen-essiv.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
ivgen-essiv.h crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
ivgen-plain.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
ivgen-plain.h crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
ivgen-plain64.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
ivgen-plain64.h crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
ivgen.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
ivgenpriv.h crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
pbkdf-gcrypt.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
pbkdf-nettle.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
pbkdf-stub.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
pbkdf.c crypto: use auto cleanup for many stack variables 2019-08-22 10:56:57 +01:00
random-gcrypt.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
random-gnutls.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
random-none.c crypto: add "none" random provider 2020-06-15 11:33:50 +01:00
random-platform.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
secret.c crypto/secret: move main logic from 'secret' to 'secret_common'. 2020-06-15 11:33:51 +01:00
secret_common.c crypto/secret: move main logic from 'secret' to 'secret_common'. 2020-06-15 11:33:51 +01:00
secret_keyring.c crypto/linux_keyring: add 'secret_keyring' secret object. 2020-06-15 11:33:51 +01:00
tls-cipher-suites.c crypto/tls-cipher-suites: Produce fw_cfg consumable blob 2020-07-03 18:16:01 +02:00
tlscreds.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
tlscredsanon.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
tlscredspriv.h crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
tlscredspsk.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
tlscredsx509.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
tlssession.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00
trace-events crypto: Add tls-cipher-suites object 2020-07-03 18:16:01 +02:00
xts.c crypto: Fix LGPL information in the file headers 2019-07-19 14:21:25 +01:00