replace 65 magic number by SHA256_DIGEST_LENGTH * 2 + 1 shiwh is more explicit while here add more sizeof()
modified libpkg/pkg_create.c
@@ -26,7 +26,7 @@ pkg_create_from_dir(struct pkg *pkg, const char *root, struct packing *pkg_archi
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -39,7 +39,7 @@ pkg_create_from_dir(struct pkg *pkg, const char *root, struct packing *pkg_archi
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified libpkg/pkg_delete.c
@@ -87,7 +87,7 @@ int
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified libpkg/pkg_manifest.c
@@ -99,7 +99,7 @@ parse_mapping(struct pkg *pkg, yaml_node_pair_t *pair, yaml_document_t *document
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified libpkg/pkg_ports.c
@@ -18,7 +18,7 @@ ports_parse_plist(struct pkg *pkg, char *plist)
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified libpkg/pkg_private.h
@@ -5,9 +5,10 @@
|
|
|
|
|
|
| - | |
|
|
|
|
| + | |
| + | |
|
|
|
|
|
@@ -64,7 +65,7 @@ struct pkg_category {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified libpkg/pkg_repo.c
@@ -23,7 +23,7 @@ int
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -118,7 +118,7 @@ load_rsa_public_key(const char *rsa_key_path)
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -132,7 +132,7 @@ pkg_repo_verify(const char *path, unsigned char *sig, unsigned int sig_len)
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -168,7 +168,7 @@ pkg_create_repo(char *path, void (progress)(struct pkg *pkg, void *data), void *
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -478,7 +478,7 @@ pkg_finish_repo(char *path, pem_password_cb *password_cb, char *rsa_key_path)
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -502,7 +502,7 @@ pkg_finish_repo(char *path, pem_password_cb *password_cb, char *rsa_key_path)
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified libpkg/pkg_util.c
@@ -10,8 +10,6 @@
|
|
|
|
|
|
| - | |
| - | |
|
|
|
|
|
@@ -219,17 +217,17 @@ is_dir(const char *path)
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -242,7 +240,7 @@ sha256_str(const char *string, char out[65])
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified libpkg/pkg_util.h
@@ -5,6 +5,8 @@
|
|
|
|
|
|
| + | |
| + | |
|
|
|
|
|
@@ -23,6 +25,6 @@ int file_fetch(const char *, const char *);
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|