{"action":"created","comment":{"url":"https://api.github.com/repos/riboseinc/rnp/pulls/comments/125817535","pull_request_review_id":48241619,"id":125817535,"diff_hunk":"@@ -0,0 +1,502 @@\n+/*\n+ * Copyright (c) 2017, [Ribose Inc](https://www.ribose.com).\n+ * All rights reserved.\n+ *\n+ * Redistribution and use in source and binary forms, with or without\n+ * modification, are permitted provided that the following conditions\n+ * are met:\n+ * 1. Redistributions of source code must retain the above copyright\n+ *    notice, this list of conditions and the following disclaimer.\n+ * 2. Redistributions in binary form must reproduce the above copyright\n+ *    notice, this list of conditions and the following disclaimer in the\n+ *    documentation and/or other materials provided with the distribution.\n+ *\n+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS\n+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\n+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS\n+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n+ * POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+#include <stdlib.h>\n+#include <stdio.h>\n+#include <string.h>\n+#include \"rnpcfg.h\"\n+#include <rnpsdk.h>\n+#include <../common/constants.h>\n+\n+#include <sys/types.h>\n+#include <sys/param.h>\n+#include <sys/stat.h>\n+#include <regex.h>\n+\n+/* SHA1 is now looking as though it should not be used.  Let's\n+ * pre-empt this by specifying SHA256 - gpg interoperates just fine\n+ * with SHA256 - agc, 20090522\n+ */\n+#define DEFAULT_HASH_ALG \"SHA256\"\n+\n+int\n+rnp_cfg_init(rnp_cfg_t *cfg)\n+{\n+    memset((void *) cfg, '\\0', sizeof(rnp_cfg_t));\n+\n+    return RNP_OK;\n+}\n+\n+int\n+rnp_cfg_load_defaults(rnp_cfg_t *cfg)\n+{\n+    rnp_cfg_setint(cfg, CFG_OVERWRITE, 1);\n+    rnp_cfg_set(cfg, CFG_OUTFILE, NULL);\n+    rnp_cfg_set(cfg, CFG_HASH, DEFAULT_HASH_ALG);\n+    rnp_cfg_set(cfg, CFG_CIPHER, \"cast5\");\n+    rnp_cfg_setint(cfg, CFG_MAXALLOC, 4194304);\n+    rnp_cfg_set(cfg, CFG_SUBDIRGPG, SUBDIRECTORY_RNP);\n+    rnp_cfg_set(cfg, CFG_SUBDIRSSH, SUBDIRECTORY_SSH);\n+    rnp_cfg_setint(cfg, CFG_NUMTRIES, MAX_PASSPHRASE_ATTEMPTS);\n+\n+    return RNP_OK;\n+}\n+\n+int\n+rnp_cfg_apply(rnp_cfg_t *cfg, rnp_params_t *params)\n+{\n+    int         passfd;\n+    const char *stream;\n+\n+    /* enabling core dumps if user wants this */\n+    if (rnp_cfg_getint(cfg, CFG_COREDUMPS)) {\n+        params->enable_coredumps = 1;\n+    }\n+\n+    /* checking if password input was specified */\n+    if ((passfd = rnp_cfg_getint(cfg, CFG_PASSFD))) {\n+        params->passfd = passfd;\n+    }\n+\n+    /* stdout/stderr and results redirection */\n+    if ((stream = rnp_cfg_get(cfg, CFG_IO_OUTS))) {\n+        params->outs = stream;\n+    }\n+\n+    if ((stream = rnp_cfg_get(cfg, CFG_IO_ERRS))) {\n+        params->errs = stream;\n+    }\n+\n+    if ((stream = rnp_cfg_get(cfg, CFG_IO_RESS))) {\n+        params->ress = stream;\n+    }\n+\n+    /* detecting keystore pathes and format */\n+    if (!rnp_cfg_get_ks_info(cfg, params))\n+        return RNP_FAIL;\n+\n+    /* default key/userid */\n+    if (!rnp_cfg_get_defkey(cfg, params))\n+        return RNP_FAIL;\n+\n+    return RNP_OK;\n+}\n+\n+/* find the value name in the rnp_cfg */\n+static int\n+rnp_cfg_find(rnp_cfg_t *cfg, const char *key)\n+{\n+    unsigned i;\n+\n+    for (i = 0; i < cfg->count && strcmp(cfg->keys[i], key) != 0; i++)\n+        ;\n+    return (i == cfg->count) ? -1 : (int) i;\n+}\n+\n+/* resize keys/vals arrays to the new size. Only expanding is supported */\n+static int\n+rnp_cfg_resize(rnp_cfg_t *cfg, unsigned newsize)\n+{\n+    char **temp;\n+\n+    if (cfg->size == 0) {\n+        /* only get here first time around */\n+        cfg->keys = calloc(sizeof(char *), newsize);\n+        cfg->vals = calloc(sizeof(char *), newsize);\n+\n+        if ((cfg->keys == NULL) || (cfg->keys == NULL)) {\n+            (void) fprintf(stderr, \"rnp_cfg_resize: bad alloc\\n\");\n+            return RNP_FAIL;\n+        }\n+        cfg->size = newsize;\n+    } else if (cfg->count == cfg->size) {\n+        /* only uses 'needed' when filled array */\n+        temp = realloc(cfg->keys, sizeof(char *) * newsize);\n+        if (temp == NULL) {\n+            (void) fprintf(stderr, \"rnp_cfg_resize: bad realloc\\n\");\n+            return RNP_FAIL;\n+        }\n+        cfg->keys = temp;\n+\n+        temp = realloc(cfg->vals, sizeof(char *) * newsize);\n+        if (temp == NULL) {\n+            (void) fprintf(stderr, \"rnp_cfg_resize: bad realloc\\n\");\n+            return RNP_FAIL;\n+        }\n+        cfg->vals = temp;\n+        cfg->size = newsize;\n+    }\n+\n+    return RNP_OK;\n+}\n+\n+/* set val for the key in config. key and val are duplicated */\n+int\n+rnp_cfg_set(rnp_cfg_t *cfg, const char *key, const char *val)\n+{\n+    char *newval = NULL;\n+    char *newkey;\n+    int   i;\n+\n+    /* protect against the case where 'value' is rnp->value[i] */\n+    if (val != NULL) {\n+        newval = rnp_strdup(val);\n+        if (newval == NULL) {\n+            (void) fprintf(stderr, \"rnp_cfg_set: bad alloc\\n\");\n+            return RNP_FAIL;\n+        }\n+    }\n+\n+    if ((i = rnp_cfg_find(cfg, key)) < 0) {\n+        /* add the element to the array */\n+        if (rnp_cfg_resize(cfg, cfg->size + 15)) {\n+            newkey = rnp_strdup(key);\n+            if (newkey == NULL) {\n+                (void) fprintf(stderr, \"rnp_cfg_set: bad alloc\\n\");\n+                return RNP_FAIL;\n+            }\n+            cfg->keys[i = cfg->count++] = newkey;\n+        } else {\n+            free(newval);\n+            return RNP_FAIL;\n+        }\n+    } else {\n+        /* replace the element in the array */\n+        if (cfg->vals[i]) {\n+            free(cfg->vals[i]);\n+            cfg->vals[i] = NULL;\n+        }\n+    }\n+\n+    cfg->vals[i] = newval;\n+    return RNP_OK;\n+}\n+\n+/* unset var for key, setting it to NULL if it exists in cfg */\n+int\n+rnp_cfg_unset(rnp_cfg_t *cfg, const char *key)\n+{\n+    int i;\n+\n+    if ((i = rnp_cfg_find(cfg, key)) >= 0) {\n+        free(cfg->vals[i]);\n+        cfg->vals[i] = NULL;\n+        return RNP_OK;\n+    }\n+    return RNP_FAIL;\n+}\n+\n+/* set int value for the key */\n+int\n+rnp_cfg_setint(rnp_cfg_t *cfg, const char *key, int val)\n+{\n+    char st[16] = {0};\n+    sprintf(st, \"%d\", val);\n+    return rnp_cfg_set(cfg, key, st);\n+}\n+\n+/* get value for the key. Returns NULL if there is no value */\n+const char *\n+rnp_cfg_get(rnp_cfg_t *cfg, const char *key)\n+{\n+    int i;\n+\n+    return ((i = rnp_cfg_find(cfg, key)) < 0) ? NULL : cfg->vals[i];\n+}\n+\n+/* get int value for the key */\n+int\n+rnp_cfg_getint(rnp_cfg_t *cfg, const char *key)\n+{\n+    const char *val = rnp_cfg_get(cfg, key);\n+    return val ? atoi(val) : 0;\n+}\n+\n+/* free the memory, used by cfg internally */\n+void\n+rnp_cfg_free(rnp_cfg_t *cfg)\n+{\n+    int i;\n+\n+    for (i = 0; i < cfg->count; i++) {\n+        free(cfg->vals[i]);\n+        free(cfg->keys[i]);\n+    }\n+\n+    free(cfg->keys);\n+    free(cfg->vals);\n+}\n+\n+int\n+rnp_cfg_get_pswdtries(rnp_cfg_t *cfg)\n+{\n+    const char *numtries;\n+    int         num;\n+\n+    numtries = rnp_cfg_get(cfg, CFG_NUMTRIES);\n+\n+    if ((numtries == NULL) || ((num = atoi(numtries)) <= 0)) {\n+        return MAX_PASSPHRASE_ATTEMPTS;\n+    } else if (strcmp(numtries, \"unlimited\")) {\n+        return INFINITE_ATTEMPTS;\n+    } else {\n+        return num;\n+    }\n+}\n+\n+int\n+rnp_cfg_check_homedir(rnp_cfg_t *cfg, char *homedir)\n+{\n+    struct stat st;\n+    int         ret;\n+\n+    if (homedir == NULL) {\n+        fputs(\"rnp: homedir option and HOME environment variable are not set \\n\", stderr);\n+        return RNP_FAIL;\n+    } else if ((ret = stat(homedir, &st)) == 0 && !S_ISDIR(st.st_mode)) {\n+        /* file exists in place of homedir */\n+        fprintf(stderr, \"rnp: homedir \\\"%s\\\" is not a dir\\n\", homedir);\n+        return RNP_FAIL;\n+    } else if (ret != 0 && errno == ENOENT) {\n+        /* If the path doesn't exist then fail. */\n+        fprintf(stderr, \"rnp: warning homedir \\\"%s\\\" not found\\n\", homedir);\n+        return RNP_FAIL;\n+    } else if (ret != 0) {\n+        /* If any other occurred then fail. */\n+        fprintf(stderr, \"rnp: an unspecified error occurred\\n\");\n+        return RNP_FAIL;\n+    }\n+\n+    return RNP_OK;\n+}\n+\n+/* read any gpg config file */\n+static int\n+conffile(const char *homedir, char *userid, size_t length)\n+{\n+    regmatch_t matchv[10];\n+    regex_t    keyre;\n+    char       buf[BUFSIZ];\n+    FILE *     fp;\n+\n+    (void) snprintf(buf, sizeof(buf), \"%s/.gnupg/gpg.conf\", homedir);\n+    if ((fp = fopen(buf, \"r\")) == NULL) {\n+        return RNP_FAIL;\n+    }\n+    (void) memset(&keyre, 0x0, sizeof(keyre));\n+    (void) regcomp(&keyre, \"^[ \\t]*default-key[ \\t]+([0-9a-zA-F]+)\", REG_EXTENDED);\n+    while (fgets(buf, (int) sizeof(buf), fp) != NULL) {\n+        if (regexec(&keyre, buf, 10, matchv, 0) == 0) {\n+            (void) memcpy(userid,\n+                          &buf[(int) matchv[1].rm_so],\n+                          MIN((unsigned) (matchv[1].rm_eo - matchv[1].rm_so), length));\n+\n+            (void) fprintf(stderr,\n+                           \"rnp: default key set to \\\"%.*s\\\"\\n\",\n+                           (int) (matchv[1].rm_eo - matchv[1].rm_so),\n+                           &buf[(int) matchv[1].rm_so]);\n+        }\n+    }\n+    (void) fclose(fp);\n+    regfree(&keyre);\n+    return RNP_OK;\n+}\n+\n+/*\n+  Compose path from dir, subdir and filename. subdir can be null, then just dir and filename\n+  will be used.\n+  res should point to the allocated buffer.\n+*/\n+int\n+rnp_path_compose(const char *dir, const char *subdir, const char *filename, char *res)\n+{\n+    int pos;\n+\n+    /* checking input parameters for conrrectness */\n+    if (!dir || !filename || !res) {\n+        return RNP_FAIL;","path":"src/rnp/rnpcfg.c","position":340,"original_position":340,"commit_id":"dd0df384dc95ee96a3daa59bc2a7e140d30cba3d","original_commit_id":"e98911dc3b00eed847c4b5e28e387a8e5b7bb7ab","user":{"login":"flowher","id":1159844,"avatar_url":"https://avatars3.githubusercontent.com/u/1159844?v=3","gravatar_id":"","url":"https://api.github.com/users/flowher","html_url":"https://github.com/flowher","followers_url":"https://api.github.com/users/flowher/followers","following_url":"https://api.github.com/users/flowher/following{/other_user}","gists_url":"https://api.github.com/users/flowher/gists{/gist_id}","starred_url":"https://api.github.com/users/flowher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flowher/subscriptions","organizations_url":"https://api.github.com/users/flowher/orgs","repos_url":"https://api.github.com/users/flowher/repos","events_url":"https://api.github.com/users/flowher/events{/privacy}","received_events_url":"https://api.github.com/users/flowher/received_events","type":"User","site_admin":false},"body":"@ronaldtse I mean - if this is function that can be called by external library then we should return descriptive error, otherwise we should crash as it's implementation error. ","created_at":"2017-07-06T06:07:43Z","updated_at":"2017-07-06T06:07:43Z","html_url":"https://github.com/riboseinc/rnp/pull/258#discussion_r125817535","pull_request_url":"https://api.github.com/repos/riboseinc/rnp/pulls/258","_links":{"self":{"href":"https://api.github.com/repos/riboseinc/rnp/pulls/comments/125817535"},"html":{"href":"https://github.com/riboseinc/rnp/pull/258#discussion_r125817535"},"pull_request":{"href":"https://api.github.com/repos/riboseinc/rnp/pulls/258"}}},"pull_request":{"url":"https://api.github.com/repos/riboseinc/rnp/pulls/258","id":128325977,"html_url":"https://github.com/riboseinc/rnp/pull/258","diff_url":"https://github.com/riboseinc/rnp/pull/258.diff","patch_url":"https://github.com/riboseinc/rnp/pull/258.patch","issue_url":"https://api.github.com/repos/riboseinc/rnp/issues/258","number":258,"state":"closed","locked":false,"title":"Major rnp refactoring: separated CLI and library layers","user":{"login":"ni4","id":4312096,"avatar_url":"https://avatars3.githubusercontent.com/u/4312096?v=3","gravatar_id":"","url":"https://api.github.com/users/ni4","html_url":"https://github.com/ni4","followers_url":"https://api.github.com/users/ni4/followers","following_url":"https://api.github.com/users/ni4/following{/other_user}","gists_url":"https://api.github.com/users/ni4/gists{/gist_id}","starred_url":"https://api.github.com/users/ni4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ni4/subscriptions","organizations_url":"https://api.github.com/users/ni4/orgs","repos_url":"https://api.github.com/users/ni4/repos","events_url":"https://api.github.com/users/ni4/events{/privacy}","received_events_url":"https://api.github.com/users/ni4/received_events","type":"User","site_admin":false},"body":"In this PR I did the following:\r\n- removed rnp_getvar/rnp_setvar and corresponding fields from the rnp_t. Now rnp_t is responsible for keyrings, keyring pathes,d default key and some other options\r\n- rnp_ctx_t now has pointer to rnp_t and is responsible for per-operation options\r\n- new type rnp_cfg_t exists only on CLI level and responsible for storage of user-specified options and converting/passing them to the rnp_t structure\r\n- new type rnp_params_t specifies rnp initialization options\r\n\r\nSo, library level now isolated from the user specified options.\r\nUnfortunately this added some complications, like rnp initialization now has more parameters/requires more calls, and separate rnp_ctx_t now should be setup before each operation.\r\n\r\nAlso all tests were changed to work correctly with the new interfaces.\r\n\r\n@dewyatt @catap @ronaldtse  @flowher Since these changes are major the discussion is welcome - probably, I missed something/something can be made better/etc. \r\n\r\nAlso I did not update readme/mans yet - probably we'll need to change some interfaces after the discussion, so I'll update readme's right before merging this PR.","created_at":"2017-06-30T09:06:19Z","updated_at":"2017-07-06T06:07:43Z","closed_at":"2017-07-05T11:06:31Z","merged_at":"2017-07-05T11:06:31Z","merge_commit_sha":"86298b1d38694fced64715937800df51c5de9450","assignee":null,"assignees":[],"requested_reviewers":[{"login":"randombit","id":469092,"avatar_url":"https://avatars3.githubusercontent.com/u/469092?v=3","gravatar_id":"","url":"https://api.github.com/users/randombit","html_url":"https://github.com/randombit","followers_url":"https://api.github.com/users/randombit/followers","following_url":"https://api.github.com/users/randombit/following{/other_user}","gists_url":"https://api.github.com/users/randombit/gists{/gist_id}","starred_url":"https://api.github.com/users/randombit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randombit/subscriptions","organizations_url":"https://api.github.com/users/randombit/orgs","repos_url":"https://api.github.com/users/randombit/repos","events_url":"https://api.github.com/users/randombit/events{/privacy}","received_events_url":"https://api.github.com/users/randombit/received_events","type":"User","site_admin":false},{"login":"dewyatt","id":711649,"avatar_url":"https://avatars1.githubusercontent.com/u/711649?v=3","gravatar_id":"","url":"https://api.github.com/users/dewyatt","html_url":"https://github.com/dewyatt","followers_url":"https://api.github.com/users/dewyatt/followers","following_url":"https://api.github.com/users/dewyatt/following{/other_user}","gists_url":"https://api.github.com/users/dewyatt/gists{/gist_id}","starred_url":"https://api.github.com/users/dewyatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dewyatt/subscriptions","organizations_url":"https://api.github.com/users/dewyatt/orgs","repos_url":"https://api.github.com/users/dewyatt/repos","events_url":"https://api.github.com/users/dewyatt/events{/privacy}","received_events_url":"https://api.github.com/users/dewyatt/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/riboseinc/rnp/pulls/258/commits","review_comments_url":"https://api.github.com/repos/riboseinc/rnp/pulls/258/comments","review_comment_url":"https://api.github.com/repos/riboseinc/rnp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/riboseinc/rnp/issues/258/comments","statuses_url":"https://api.github.com/repos/riboseinc/rnp/statuses/dd0df384dc95ee96a3daa59bc2a7e140d30cba3d","head":{"label":"riboseinc:ni4-245-refactor-rnp-config","ref":"ni4-245-refactor-rnp-config","sha":"dd0df384dc95ee96a3daa59bc2a7e140d30cba3d","user":{"login":"riboseinc","id":24904375,"avatar_url":"https://avatars3.githubusercontent.com/u/24904375?v=3","gravatar_id":"","url":"https://api.github.com/users/riboseinc","html_url":"https://github.com/riboseinc","followers_url":"https://api.github.com/users/riboseinc/followers","following_url":"https://api.github.com/users/riboseinc/following{/other_user}","gists_url":"https://api.github.com/users/riboseinc/gists{/gist_id}","starred_url":"https://api.github.com/users/riboseinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riboseinc/subscriptions","organizations_url":"https://api.github.com/users/riboseinc/orgs","repos_url":"https://api.github.com/users/riboseinc/repos","events_url":"https://api.github.com/users/riboseinc/events{/privacy}","received_events_url":"https://api.github.com/users/riboseinc/received_events","type":"Organization","site_admin":false},"repo":{"id":84580444,"name":"rnp","full_name":"riboseinc/rnp","owner":{"login":"riboseinc","id":24904375,"avatar_url":"https://avatars3.githubusercontent.com/u/24904375?v=3","gravatar_id":"","url":"https://api.github.com/users/riboseinc","html_url":"https://github.com/riboseinc","followers_url":"https://api.github.com/users/riboseinc/followers","following_url":"https://api.github.com/users/riboseinc/following{/other_user}","gists_url":"https://api.github.com/users/riboseinc/gists{/gist_id}","starred_url":"https://api.github.com/users/riboseinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riboseinc/subscriptions","organizations_url":"https://api.github.com/users/riboseinc/orgs","repos_url":"https://api.github.com/users/riboseinc/repos","events_url":"https://api.github.com/users/riboseinc/events{/privacy}","received_events_url":"https://api.github.com/users/riboseinc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/riboseinc/rnp","description":"rnp is a C library approach to OpenPGP; GnuPG alternative","fork":false,"url":"https://api.github.com/repos/riboseinc/rnp","forks_url":"https://api.github.com/repos/riboseinc/rnp/forks","keys_url":"https://api.github.com/repos/riboseinc/rnp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/riboseinc/rnp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/riboseinc/rnp/teams","hooks_url":"https://api.github.com/repos/riboseinc/rnp/hooks","issue_events_url":"https://api.github.com/repos/riboseinc/rnp/issues/events{/number}","events_url":"https://api.github.com/repos/riboseinc/rnp/events","assignees_url":"https://api.github.com/repos/riboseinc/rnp/assignees{/user}","branches_url":"https://api.github.com/repos/riboseinc/rnp/branches{/branch}","tags_url":"https://api.github.com/repos/riboseinc/rnp/tags","blobs_url":"https://api.github.com/repos/riboseinc/rnp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/riboseinc/rnp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/riboseinc/rnp/git/refs{/sha}","trees_url":"https://api.github.com/repos/riboseinc/rnp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/riboseinc/rnp/statuses/{sha}","languages_url":"https://api.github.com/repos/riboseinc/rnp/languages","stargazers_url":"https://api.github.com/repos/riboseinc/rnp/stargazers","contributors_url":"https://api.github.com/repos/riboseinc/rnp/contributors","subscribers_url":"https://api.github.com/repos/riboseinc/rnp/subscribers","subscription_url":"https://api.github.com/repos/riboseinc/rnp/subscription","commits_url":"https://api.github.com/repos/riboseinc/rnp/commits{/sha}","git_commits_url":"https://api.github.com/repos/riboseinc/rnp/git/commits{/sha}","comments_url":"https://api.github.com/repos/riboseinc/rnp/comments{/number}","issue_comment_url":"https://api.github.com/repos/riboseinc/rnp/issues/comments{/number}","contents_url":"https://api.github.com/repos/riboseinc/rnp/contents/{+path}","compare_url":"https://api.github.com/repos/riboseinc/rnp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/riboseinc/rnp/merges","archive_url":"https://api.github.com/repos/riboseinc/rnp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/riboseinc/rnp/downloads","issues_url":"https://api.github.com/repos/riboseinc/rnp/issues{/number}","pulls_url":"https://api.github.com/repos/riboseinc/rnp/pulls{/number}","milestones_url":"https://api.github.com/repos/riboseinc/rnp/milestones{/number}","notifications_url":"https://api.github.com/repos/riboseinc/rnp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/riboseinc/rnp/labels{/name}","releases_url":"https://api.github.com/repos/riboseinc/rnp/releases{/id}","deployments_url":"https://api.github.com/repos/riboseinc/rnp/deployments","created_at":"2017-03-10T16:41:47Z","updated_at":"2017-06-29T17:16:51Z","pushed_at":"2017-07-06T05:50:59Z","git_url":"git://github.com/riboseinc/rnp.git","ssh_url":"git@github.com:riboseinc/rnp.git","clone_url":"https://github.com/riboseinc/rnp.git","svn_url":"https://github.com/riboseinc/rnp","homepage":"","size":7704,"stargazers_count":9,"watchers_count":9,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":95,"forks":7,"open_issues":95,"watchers":9,"default_branch":"master"}},"base":{"label":"riboseinc:master","ref":"master","sha":"c09f27074fc4bd160d746f60246960d571840395","user":{"login":"riboseinc","id":24904375,"avatar_url":"https://avatars3.githubusercontent.com/u/24904375?v=3","gravatar_id":"","url":"https://api.github.com/users/riboseinc","html_url":"https://github.com/riboseinc","followers_url":"https://api.github.com/users/riboseinc/followers","following_url":"https://api.github.com/users/riboseinc/following{/other_user}","gists_url":"https://api.github.com/users/riboseinc/gists{/gist_id}","starred_url":"https://api.github.com/users/riboseinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riboseinc/subscriptions","organizations_url":"https://api.github.com/users/riboseinc/orgs","repos_url":"https://api.github.com/users/riboseinc/repos","events_url":"https://api.github.com/users/riboseinc/events{/privacy}","received_events_url":"https://api.github.com/users/riboseinc/received_events","type":"Organization","site_admin":false},"repo":{"id":84580444,"name":"rnp","full_name":"riboseinc/rnp","owner":{"login":"riboseinc","id":24904375,"avatar_url":"https://avatars3.githubusercontent.com/u/24904375?v=3","gravatar_id":"","url":"https://api.github.com/users/riboseinc","html_url":"https://github.com/riboseinc","followers_url":"https://api.github.com/users/riboseinc/followers","following_url":"https://api.github.com/users/riboseinc/following{/other_user}","gists_url":"https://api.github.com/users/riboseinc/gists{/gist_id}","starred_url":"https://api.github.com/users/riboseinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riboseinc/subscriptions","organizations_url":"https://api.github.com/users/riboseinc/orgs","repos_url":"https://api.github.com/users/riboseinc/repos","events_url":"https://api.github.com/users/riboseinc/events{/privacy}","received_events_url":"https://api.github.com/users/riboseinc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/riboseinc/rnp","description":"rnp is a C library approach to OpenPGP; GnuPG alternative","fork":false,"url":"https://api.github.com/repos/riboseinc/rnp","forks_url":"https://api.github.com/repos/riboseinc/rnp/forks","keys_url":"https://api.github.com/repos/riboseinc/rnp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/riboseinc/rnp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/riboseinc/rnp/teams","hooks_url":"https://api.github.com/repos/riboseinc/rnp/hooks","issue_events_url":"https://api.github.com/repos/riboseinc/rnp/issues/events{/number}","events_url":"https://api.github.com/repos/riboseinc/rnp/events","assignees_url":"https://api.github.com/repos/riboseinc/rnp/assignees{/user}","branches_url":"https://api.github.com/repos/riboseinc/rnp/branches{/branch}","tags_url":"https://api.github.com/repos/riboseinc/rnp/tags","blobs_url":"https://api.github.com/repos/riboseinc/rnp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/riboseinc/rnp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/riboseinc/rnp/git/refs{/sha}","trees_url":"https://api.github.com/repos/riboseinc/rnp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/riboseinc/rnp/statuses/{sha}","languages_url":"https://api.github.com/repos/riboseinc/rnp/languages","stargazers_url":"https://api.github.com/repos/riboseinc/rnp/stargazers","contributors_url":"https://api.github.com/repos/riboseinc/rnp/contributors","subscribers_url":"https://api.github.com/repos/riboseinc/rnp/subscribers","subscription_url":"https://api.github.com/repos/riboseinc/rnp/subscription","commits_url":"https://api.github.com/repos/riboseinc/rnp/commits{/sha}","git_commits_url":"https://api.github.com/repos/riboseinc/rnp/git/commits{/sha}","comments_url":"https://api.github.com/repos/riboseinc/rnp/comments{/number}","issue_comment_url":"https://api.github.com/repos/riboseinc/rnp/issues/comments{/number}","contents_url":"https://api.github.com/repos/riboseinc/rnp/contents/{+path}","compare_url":"https://api.github.com/repos/riboseinc/rnp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/riboseinc/rnp/merges","archive_url":"https://api.github.com/repos/riboseinc/rnp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/riboseinc/rnp/downloads","issues_url":"https://api.github.com/repos/riboseinc/rnp/issues{/number}","pulls_url":"https://api.github.com/repos/riboseinc/rnp/pulls{/number}","milestones_url":"https://api.github.com/repos/riboseinc/rnp/milestones{/number}","notifications_url":"https://api.github.com/repos/riboseinc/rnp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/riboseinc/rnp/labels{/name}","releases_url":"https://api.github.com/repos/riboseinc/rnp/releases{/id}","deployments_url":"https://api.github.com/repos/riboseinc/rnp/deployments","created_at":"2017-03-10T16:41:47Z","updated_at":"2017-06-29T17:16:51Z","pushed_at":"2017-07-06T05:50:59Z","git_url":"git://github.com/riboseinc/rnp.git","ssh_url":"git@github.com:riboseinc/rnp.git","clone_url":"https://github.com/riboseinc/rnp.git","svn_url":"https://github.com/riboseinc/rnp","homepage":"","size":7704,"stargazers_count":9,"watchers_count":9,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":95,"forks":7,"open_issues":95,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/riboseinc/rnp/pulls/258"},"html":{"href":"https://github.com/riboseinc/rnp/pull/258"},"issue":{"href":"https://api.github.com/repos/riboseinc/rnp/issues/258"},"comments":{"href":"https://api.github.com/repos/riboseinc/rnp/issues/258/comments"},"review_comments":{"href":"https://api.github.com/repos/riboseinc/rnp/pulls/258/comments"},"review_comment":{"href":"https://api.github.com/repos/riboseinc/rnp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/riboseinc/rnp/pulls/258/commits"},"statuses":{"href":"https://api.github.com/repos/riboseinc/rnp/statuses/dd0df384dc95ee96a3daa59bc2a7e140d30cba3d"}}}}
{"actor":{"display_login":"flowher"}}