-/* --- @km_getpubkey@ --- *
- *
- * Arguments: @const char *tag@ = public key tag to load
- * @ge *kpub@ = where to put the public key
- * @time_t *t_exp@ = where to put the expiry time
- *
- * Returns: Zero if OK, nonzero if it failed.
- *
- * Use: Fetches a public key from the keyring. (Temporary
- * compatibility hack.)
- */
-
-int km_getpubkey(const char *tag, ge *kpub, time_t *t_exp)
-{
- kdata *kd;
- int rc = -1;
-
- if ((kd = km_findpub(tag)) == 0)
- goto done_0;
- if (!km_samealgsp(kd, master)) {
- a_warn("KEYMGMT", "public-keyring",
- "%s", kd->kn->kh->kr, "key", "%s", kd->tag,
- "algorithm-mismatch", A_END);
- goto done_1;
- }
- G_COPY(gg, kpub, kd->kpub);
- *t_exp = kd->t_exp;
- rc = 0;
-done_1:
- km_unref(kd);
-done_0:
- return (rc);
-}
-