예제 #1
0
 Record rdataFromString(Name name, int dclass, long ttl, Tokenizer st, Name origin)
     throws IOException {
   CERTRecord rec = new CERTRecord(name, dclass, ttl);
   rec.certType = st.getUInt16();
   rec.keyTag = st.getUInt16();
   rec.alg = st.getUInt8();
   rec.cert = base64.fromString(remainingStrings(st));
   return rec;
 }
예제 #2
0
파일: SIGBase.java 프로젝트: lemmy/dnsjava
 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;
 }