Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Fix openssl API that accidently crept in the public API
Baptiste Daroussin committed 10 years ago
commit c05dc9900444f68e30a94d85e888ba4ecce89bb1
parent 8565aa78c60430ebb6bfb9538a7945f302de759f
3 files changed +7 -5
modified libpkg/pkg.h.in
@@ -818,11 +818,13 @@ int pkg_is_installed(struct pkgdb *db, const char *name);
 * @param metafile Open meta from the specified file
 * @param legacy Create legacy (1.2 compatible) repo
 */
+
typedef int(pkg_password_cb)(char *, int, int, void*);
int pkg_create_repo(char *path, const char *output_dir, bool filelist,
	const char *metafile, bool legacy);
-
int pkg_finish_repo(const char *output_dir, pem_password_cb *cb, char **argv,
+
int pkg_finish_repo(const char *output_dir, pkg_password_cb *cb, char **argv,
    int argc, bool filelist);

+

/**
 * Test if the EUID has sufficient privilege to carry out some
 * operation (mode is a bitmap indicating READ, WRITE, CREATE) on the
modified libpkg/private/utils.h
@@ -35,8 +35,8 @@
#include <uthash.h>
#include <ucl.h>
#include <khash.h>
+
#include <pkg.h>

-
#include <openssl/pem.h>
#include <openssl/rsa.h>

#define STARTS_WITH(string, needle) (strncasecmp(string, needle, strlen(needle)) == 0)
@@ -63,7 +63,7 @@ struct dns_srvinfo {
};

struct rsa_key {
-
	pem_password_cb *pw_cb;
+
	pkg_password_cb *pw_cb;
	char *path;
	RSA *key;
};
@@ -81,7 +81,7 @@ int format_exec_cmd(char **, const char *, const char *, const char *, char *,
    int argc, char **argv);
int is_dir(const char *);

-
int rsa_new(struct rsa_key **, pem_password_cb *, char *path);
+
int rsa_new(struct rsa_key **, pkg_password_cb *, char *path);
void rsa_free(struct rsa_key *);
int rsa_sign(char *path, struct rsa_key *rsa, unsigned char **sigret, unsigned int *siglen);
int rsa_verify(const char *path, const char *key,
modified libpkg/rsa.c
@@ -299,7 +299,7 @@ rsa_sign(char *path, struct rsa_key *rsa, unsigned char **sigret, unsigned int *
}

int
-
rsa_new(struct rsa_key **rsa, pem_password_cb *cb, char *path)
+
rsa_new(struct rsa_key **rsa, pkg_password_cb *cb, char *path)
{
	assert(*rsa == NULL);