bin/xbps-rindex/sign.c: add 0.27 compat glue.
This commit is contained in:
parent
a57fe48709
commit
23650f1c66
@ -259,6 +259,21 @@ sign_repo(struct xbps_handle *xhp, const char *repodir,
|
|||||||
xbps_dictionary_set_uint16(meta, "public-key-size", RSA_size(rsa) * 8);
|
xbps_dictionary_set_uint16(meta, "public-key-size", RSA_size(rsa) * 8);
|
||||||
free(buf);
|
free(buf);
|
||||||
xbps_object_release(data);
|
xbps_object_release(data);
|
||||||
|
/*
|
||||||
|
* XXX remove this code when 0.29 is released.
|
||||||
|
* Sign the index for compatibility with 0.27.
|
||||||
|
*/
|
||||||
|
if ((buf = xbps_dictionary_externalize(idx)) == NULL) {
|
||||||
|
fprintf(stderr, "failed to externalize repository index: %s\n", strerror(errno));
|
||||||
|
return errno;
|
||||||
|
}
|
||||||
|
if (!rsa_sign_buf(rsa, buf, strlen(buf), &sig, &siglen)) {
|
||||||
|
fprintf(stderr, "failed to create repository index signature: %s\n", strerror(errno));
|
||||||
|
return errno;
|
||||||
|
}
|
||||||
|
data = xbps_data_create_data_nocopy(sig, siglen);
|
||||||
|
xbps_dictionary_set(meta, "signature", data);
|
||||||
|
free(buf);
|
||||||
/*
|
/*
|
||||||
* and finally write our repodata file!
|
* and finally write our repodata file!
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user