Lines Matching defs:zp
117 ** Check if the parent directory of the zone specified by zp
121 static int is_parentdirsigned (const zone_t *zonelist, const zone_t *zp)
129 snprintf (path, sizeof (path), "%s/../%s", zp->dir, LOCALCONF_FILE);
133 conf = zp->conf;
137 if ( conf != zp->conf ) /* if we read in a local config file.. */
147 ext = strrchr (zp->sfile, '.');
148 if ( ext && strcmp (zp->sfile, ".dsigned") == 0 ) /* is the current zone a dynamic one ? */
150 snprintf (path, sizeof (path), "%s/../%s", zp->dir, "zone.db.signed");
158 parentname = strchr (zp->zone, '.'); /* find first dot in zone name */
168 snprintf (path, sizeof (path), "%s/../%s", zp->dir, zp->sfile);
172 lg_mesg (LG_DEBUG, "%s: is_parentdirsigned = %d fileexist (%s)\n", zp->zone, fileexist (path), path);
224 static int kskrollover (dki_t *ksk, zone_t *zonelist, zone_t *zp)
239 assert ( zp != NULL );
241 z = zp->conf;
250 pathname (path, sizeof (path), zp->dir, "parent-", zp->zone);
256 if ( z->keysetdir && strcmp (z->keysetdir, "..") == 0 && is_parentdirsigned (zonelist, zp) )
260 ksk = genkey (&zp->keys, zp->dir, zp->zone, DKI_KSK, z, DKI_ACTIVE);
263 lg_mesg (LG_ERROR, "\"%s\": unable to generate new ksk for double signing rollover", zp->zone);
266 lg_mesg (LG_INFO, "\"%s\": kskrollover phase1: New key %d generated", zp->zone, ksk->tag);
269 if ( (ksk = (dki_t *)dki_findalgo (zp->keys, DKI_KSK, zp->conf->k_algo, 'a', 1)) == NULL )
280 zp->zone, ksk->tag, str_delspace (age2str (age - lifetime)));
309 lg_mesg (LG_INFO, "\"%s\": kskrollover phase2: send new key %d to the parent zone", zp->zone, ksk->tag);
326 zp->keys = dki_remove (ksk);
331 lg_mesg (LG_INFO, "\"%s\": kskrollover phase3: Remove old key %d", zp->zone, ksk->tag);
470 int kskstatus (zone_t *zonelist, zone_t *zp)
475 assert ( zp != NULL );
477 z = zp->conf;
483 akey = (dki_t *)dki_findalgo (zp->keys, DKI_KSK, z->k_algo, 'a', 1);
487 akey = genkey (&zp->keys, zp->dir, zp->zone, DKI_KSK, z, DKI_ACTIVE);
492 zp->zone, dki_geterrstr());
495 lg_mesg (LG_INFO, "\"%s\": generated new KSK %d", zp->zone, akey->tag);
499 kskrollover (akey, zonelist, zp);
505 akey = (dki_t *)dki_findalgo (zp->keys, DKI_KSK, z->k2_algo, 'a', 1);
509 akey = genkey2 (&zp->keys, zp->dir, zp->zone, DKI_KSK, z, DKI_ACTIVE);
514 zp->zone, dki_geterrstr());
518 zp->zone, akey->tag);