diff --git a/lib/dnssdint.h b/lib/dnssdint.h index f81517c..6a457d0 100644 --- a/lib/dnssdint.h +++ b/lib/dnssdint.h @@ -20,6 +20,8 @@ #include "global.h" +/* the previous behavior of announcing UxPlay with a fixed public key PK + * can be restored by uncommenting the following line */ //#define PK "b07727d6f6cd6e08b58ede525ec3cdeaa252ad9f683feb212ef8a205246554e7" #define RAOP_TXTVERS "1" diff --git a/lib/raop.c b/lib/raop.c index 13d7c32..1cfcfb5 100644 --- a/lib/raop.c +++ b/lib/raop.c @@ -435,11 +435,15 @@ raop_init(int max_clients, raop_callbacks_t *callbacks) { } /* store PK as a string in raop->pk_str */ +#ifdef PK + strncpy(raop->pk_str, PK, 2*ED25519_KEY_SIZE + 1); +#else unsigned char public_key[ED25519_KEY_SIZE]; pairing_get_public_key(pairing, public_key); char *pk_str = utils_pk_to_string(public_key, ED25519_KEY_SIZE); strncpy(raop->pk_str, (const char *) pk_str, 2*ED25519_KEY_SIZE + 1); free(pk_str); +#endif /* Set HTTP callbacks to our handlers */ memset(&httpd_cbs, 0, sizeof(httpd_cbs));