Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 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;
 }