void rdataFromString(Tokenizer st, Name origin) throws IOException { String certTypeString = st.getString(); certType = CertificateType.value(certTypeString); if (certType < 0) throw st.exception("Invalid certificate type: " + certTypeString); keyTag = st.getUInt16(); String algString = st.getString(); alg = DNSSEC.Algorithm.value(algString); if (alg < 0) throw st.exception("Invalid algorithm: " + algString); cert = st.getBase64(); }
void rdataFromString(Tokenizer st, Name origin) throws IOException { String flagString = st.getIdentifier(); flags = Flags.value(flagString); if (flags < 0) throw st.exception("Invalid flags: " + flagString); String protoString = st.getIdentifier(); proto = Protocol.value(protoString); if (proto < 0) throw st.exception("Invalid protocol: " + protoString); String algString = st.getIdentifier(); alg = DNSSEC.Algorithm.value(algString); if (alg < 0) throw st.exception("Invalid algorithm: " + algString); /* If this is a null KEY, there's no key data */ if ((flags & Flags.USE_MASK) == Flags.NOKEY) key = null; else key = st.getBase64(); }
protected static Record rdataFromString(SIGBase rec, Tokenizer st, Name origin) throws IOException { String typeString = st.getString(); int covered = Type.value(typeString); if (covered < 0) throw st.exception("Invalid type: " + typeString); rec.covered = covered; String algString = st.getString(); int alg = DNSSEC.Algorithm.value(algString); if (alg < 0) throw st.exception("Invalid algorithm: " + algString); rec.alg = alg; rec.labels = st.getUInt8(); rec.origttl = st.getTTL(); rec.expire = FormattedTime.parse(st.getString()); rec.timeSigned = FormattedTime.parse(st.getString()); rec.footprint = st.getUInt16(); rec.signer = st.getName(origin); rec.signature = st.getBase64(); return rec; }