Exemplo n.º 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;
 }
Exemplo n.º 2
0
 Record rrFromWire(Name name, int type, int dclass, long ttl, int length, DataByteInputStream in)
     throws IOException {
   CERTRecord rec = new CERTRecord(name, dclass, ttl);
   if (in == null) return rec;
   rec.certType = in.readShort();
   rec.keyTag = in.readUnsignedShort();
   rec.alg = in.readByte();
   if (length > 5) {
     rec.cert = new byte[length - 5];
     in.read(rec.cert);
   }
   return rec;
 }