restore previous PK behavior by uncommenting PK line in dnssdint.h

This commit is contained in:
F. Duncanh
2023-11-25 09:07:04 -05:00
parent 7dca45983d
commit b0332f3712
2 changed files with 6 additions and 0 deletions

View File

@@ -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"

View File

@@ -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));