Skip to content

Commit

Permalink
migration/tls: Use qcrypto_tls_creds_check_endpoint()
Browse files Browse the repository at this point in the history
Avoid accessing QCryptoTLSCreds internals by using
the qcrypto_tls_creds_check_endpoint() helper.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
  • Loading branch information
philmd authored and berrange committed Jun 29, 2021
1 parent 8612df2 commit 5590f65
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions migration/tls.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 5590f65

Please sign in to comment.