108
110
{ oVerbose, "verbose", 0, "verbose" },
109
111
{ oArmor, "armor", 0, "write output in advanced format" },
112
{ oCanonical, "canonical", 0, "write output in canonical format" },
110
113
{ oPassphrase, "passphrase", 2, "|STRING|use passphrase STRING" },
111
114
{ oProtect, "protect", 256, "protect a private key"},
112
115
{ oUnprotect, "unprotect", 256, "unprotect a private key"},
113
{ oShadow, "shadow", 256, "create a shadow entry for a priblic key"},
116
{ oShadow, "shadow", 256, "create a shadow entry for a public key"},
114
117
{ oShowShadowInfo, "show-shadow-info", 256, "return the shadow info"},
115
118
{ oShowKeygrip, "show-keygrip", 256, "show the \"keygrip\""},
237
240
size_t erroff, len;
238
241
gcry_sexp_t sexp;
239
unsigned char *result;
241
rc = gcry_sexp_sscan (&sexp, &erroff, buf, buflen);
244
rc = gcry_sexp_sscan (&sexp, &erroff, (const char*)buf, buflen);
244
247
log_error ("invalid canonical S-Expression (off=%u): %s\n",
431
434
unsigned char *key;
432
435
unsigned char *result;
433
436
size_t resultlen;
437
unsigned char dummy_info[] = "(8:313233342:43)";
435
439
key = read_key (fname);
439
rc = agent_shadow_key (key, "(8:313233342:43)", &result);
443
rc = agent_shadow_key (key, dummy_info, &result);
509
513
keylen = gcry_sexp_canon_len (key, 0, NULL,NULL);
512
p = make_advanced (key, keylen);
518
fwrite (key, keylen, 1, stdout);
522
p = make_advanced (key, keylen);
525
fwrite (p, strlen (p), 1, stdout);
516
fwrite (p, strlen (p), 1, stdout);
675
kparms = p12_parse (buf, buflen, (pw=get_passphrase (2)),
686
kparms = p12_parse ((unsigned char*)buf, buflen, (pw=get_passphrase (2)),
676
687
import_p12_cert_cb, NULL);
677
688
release_passphrase (pw);
923
934
if (opt_have_cert)
925
cert = read_file ("-", &certlen);
936
cert = (unsigned char*)read_file ("-", &certlen);
928
939
wipememory (key, keylen_for_wipe);
1080
1091
case oVerbose: opt.verbose++; break;
1081
1092
case oArmor: opt_armor=1; break;
1093
case oCanonical: opt_canonical=1; break;
1082
1094
case oHomedir: opt_homedir = pargs.r.ret_str; break;
1084
1096
case oProtect: cmd = oProtect; break;