halg, t.buf);
}
- dstr_reset(&d);
- if ((q = key_getattr(0, k, "kdf")) == 0) {
- dstr_putf(&d, "%s-mgf", kk->hc->name);
- q = d.buf;
- }
- if ((kk->cxc = gcipher_byname(q)) == 0) {
- die(EXIT_FAILURE, "encryption scheme (KDF) `%s' not found in key `%s'",
- q, t.buf);
- }
-
if (!balg)
bt = bulktab;
else {
*bc = bo->init(k, balg, kk->hc->name);
(*bc)->ops = bo;
+ dstr_reset(&d);
+ if ((q = key_getattr(0, k, "kdf")) == 0) {
+ dstr_putf(&d, "%s-mgf", kk->hc->name);
+ q = d.buf;
+ }
+ if ((kk->cxc = gcipher_byname(q)) == 0) {
+ die(EXIT_FAILURE, "encryption scheme (KDF) `%s' not found in key `%s'",
+ q, t.buf);
+ }
+
/* --- Tidy up --- */
dstr_destroy(&d);