[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 5/7] migration/tls: Use qcrypto_tls_creds_check_endpoint()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v6 5/7] migration/tls: Use qcrypto_tls_creds_check_endpoint() |
Date: |
Mon, 28 Jun 2021 18:09:12 +0200 |
Avoid accessing QCryptoTLSCreds internals by using
the qcrypto_tls_creds_check_endpoint() helper.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
migration/tls.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/migration/tls.c b/migration/tls.c
index abb149d8325..ca1ea3bbdd4 100644
--- a/migration/tls.c
+++ b/migration/tls.c
@@ -49,11 +49,7 @@ migration_tls_get_creds(MigrationState *s,
s->parameters.tls_creds);
return NULL;
}
- if (ret->endpoint != endpoint) {
- error_setg(errp,
- "Expected TLS credentials for a %s endpoint",
- endpoint == QCRYPTO_TLS_CREDS_ENDPOINT_CLIENT ?
- "client" : "server");
+ if (!qcrypto_tls_creds_check_endpoint(ret, endpoint, errp)) {
return NULL;
}
--
2.31.1
- [PATCH v6 0/7] crypto: Make QCryptoTLSCreds* structures private, Philippe Mathieu-Daudé, 2021/06/28
- [PATCH v6 1/7] crypto/tlscreds: Introduce qcrypto_tls_creds_check_endpoint() helper, Philippe Mathieu-Daudé, 2021/06/28
- [PATCH v6 2/7] block/nbd: Use qcrypto_tls_creds_check_endpoint(), Philippe Mathieu-Daudé, 2021/06/28
- [PATCH v6 4/7] chardev/socket: Use qcrypto_tls_creds_check_endpoint(), Philippe Mathieu-Daudé, 2021/06/28
- [PATCH v6 5/7] migration/tls: Use qcrypto_tls_creds_check_endpoint(),
Philippe Mathieu-Daudé <=
- [PATCH v6 6/7] ui/vnc: Use qcrypto_tls_creds_check_endpoint(), Philippe Mathieu-Daudé, 2021/06/28
- [PATCH v6 7/7] crypto: Make QCryptoTLSCreds* structures private, Philippe Mathieu-Daudé, 2021/06/28
- [PATCH v6 3/7] qemu-nbd: Use qcrypto_tls_creds_check_endpoint(), Philippe Mathieu-Daudé, 2021/06/28