[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 4/7] migration/tls: Use qcrypto_tls_creds_check_endpoint()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 4/7] migration/tls: Use qcrypto_tls_creds_check_endpoint() |
Date: |
Tue, 15 Jun 2021 18:47:48 +0200 |
Avoid accessing QCryptoTLSCreds internals by using
the qcrypto_tls_creds_check_endpoint() helper.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
migration/tls.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/migration/tls.c b/migration/tls.c
index abb149d8325..ee49ecba484 100644
--- a/migration/tls.c
+++ b/migration/tls.c
@@ -49,7 +49,7 @@ migration_tls_get_creds(MigrationState *s,
s->parameters.tls_creds);
return NULL;
}
- if (ret->endpoint != endpoint) {
+ if (!qcrypto_tls_creds_check_endpoint(ret, endpoint)) {
error_setg(errp,
"Expected TLS credentials for a %s endpoint",
endpoint == QCRYPTO_TLS_CREDS_ENDPOINT_CLIENT ?
--
2.31.1
- [PATCH v2 0/7] crypto: Make QCryptoTLSCreds* structures private, Philippe Mathieu-Daudé, 2021/06/15
- [PATCH v2 1/7] crypto/tlscreds: Introduce qcrypto_tls_creds_check_endpoint() helper, Philippe Mathieu-Daudé, 2021/06/15
- [PATCH v2 2/7] block/nbd: Use qcrypto_tls_creds_check_endpoint(), Philippe Mathieu-Daudé, 2021/06/15
- [PATCH v2 3/7] chardev/socket: Use qcrypto_tls_creds_check_endpoint(), Philippe Mathieu-Daudé, 2021/06/15
- [PATCH v2 4/7] migration/tls: Use qcrypto_tls_creds_check_endpoint(),
Philippe Mathieu-Daudé <=
- [PATCH v2 5/7] crypto/tlssession: Introduce qcrypto_tls_creds_check_endpoint() helper, Philippe Mathieu-Daudé, 2021/06/15
- [PATCH v2 6/7] ui/vnc: Use qcrypto_tls_session_check_role(), Philippe Mathieu-Daudé, 2021/06/15
- [PATCH v2 7/7] crypto: Make QCryptoTLSCreds* structures private, Philippe Mathieu-Daudé, 2021/06/15