Skip to content

Commit

Permalink
Refs #100974 NetFetch needs to create internal keystore file if missing.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Briggs committed May 17, 2013
1 parent d8832d5 commit e01cda8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/HttpProxy/NetFetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -987,10 +987,16 @@ init_internal_keystore(MainData md) {
ccn_charbuf_putf(temp, ".%s_keystore", kPrefix);
keystore_path = Concat(ccn_charbuf_as_string(temp), "");
res = ccn_load_default_key(md->ccn, keystore_path, CCNK_KEYSTORE_PASS);
if (res >= 0)
goto Finish;
res = ccn_keystore_file_init(keystore_path, CCNK_KEYSTORE_PASS, "NetFetch", 0, 0);
if (res != 0) {
culprit = keystore_path;
goto Finish;
}
res = ccn_load_default_key(md->ccn, keystore_path, CCNK_KEYSTORE_PASS);
if (res != 0)
culprit = keystore_path;
Finish:
if (culprit != NULL) {
fprintf(stdout,
Expand Down

0 comments on commit e01cda8

Please sign in to comment.