[raop] Drop handling of old auth_keys, not necessary with db schema update

This commit is contained in:
ejurgensen 2021-01-03 22:32:38 +01:00
parent 8368ca7686
commit fac97eed9c

View File

@ -4207,21 +4207,13 @@ static int
raop_pair_verify(struct raop_session *rs) raop_pair_verify(struct raop_session *rs)
{ {
struct output_device *device; struct output_device *device;
const char *auth_key;
int ret; int ret;
device = outputs_device_get(rs->device_id); device = outputs_device_get(rs->device_id);
if (!device) if (!device)
goto error; goto error;
// Backwards compat - older versions saved the key as concat of public key and CHECK_NULL(L_RAOP, rs->pair_verify_ctx = pair_verify_new(PAIR_FRUIT, device->auth_key, NULL));
// private key, but the pair_verify_new only wants the private key
if (strlen(device->auth_key) == (32 + 64) * 2)
auth_key = device->auth_key + 32;
else
auth_key = device->auth_key;
CHECK_NULL(L_RAOP, rs->pair_verify_ctx = pair_verify_new(PAIR_FRUIT, auth_key, NULL));
ret = raop_pair_request_send(4, rs, raop_cb_pair_verify_step1); ret = raop_pair_request_send(4, rs, raop_cb_pair_verify_step1);
if (ret < 0) if (ret < 0)