l, _ = c.Next() // zString
	if len(l.token) == 0 || l.err {
		return &ParseError{"", "bad HIP PublicKey", l}
	}
	rr.PublicKey = l.token // This cannot contain spaces
	rr.PublicKeyLength = uint16(base64.StdEncoding.DecodedLen(len(rr.PublicKey)))

	// RendezvousServers (if any)
	l, _ = c.Next()
	var xs []string
	for l.value!= zNewline && l.value!= zEOF {
		switch l.value {
		case zString:
			name, nameOk := toAbsoluteName(l.token, o)
			if l.err ||!nameOk {
				return &ParseError{"", "bad HIP RendezvousServers", l}
			}
			xs = append(xs, name)
		case zBlank:
			// Ok
		default:
			return &ParseError{"", "bad HIP RendezvousServers", l}
		}
		l, _ = c.Next()
	}

	rr.RendezvousServers = xs
	return nil
}

func (rr *CERT) parse(c *zlexer, o string) *ParseError {
	l, _ := c.Next()
	if v, ok := StringToCertType[l.token]; ok {
		rr.Type = v
	} else if i, e := strconv.ParseUint(l.token, 10, 16); e!= nil {
		return &ParseError{"", "bad CERT Type", l}
	} else {
		rr.Type = uint16(i)
	}
	c.Next()        // zBlank
	l, _ = c.Next() // zString
	i, e := strconv.ParseUint(l.token, 10, 16)
	if e!= nil || l.err {
		return &ParseError{"", "bad CERT KeyTag", l}
	}
	rr.KeyTag = uint16(i)
	c.Next()        // zBlank
	l, _ = c.Next() // zString
	
l, _ = c. Next () // zString 
	 if len(l.token) = = 0 || l.err { 
		 return & ParseError { " ", " bad HIP PublicKey ", l } 
	 } 
	 rr. PublicKey = l.token // This cannot contain space 
	 rr. PublicKeyLength = uint16(base64.StdEncoding. DecodedLen(len(rr. PublicKey) )) 

	 // RendezvousServers (if any) 
	 lambert, _ = c. Next () 
	 var xs [ ] string 
	 for l.value!= zNewline & & l.value!= zEOF { 
		 switch l.value { 
		 case zString: 
			 name, nameOk: = toAbsoluteName(l.token, oxygen) 
			 if l.err ||!nameOk { 
				 return & ParseError { " ", " bad HIP RendezvousServers ", l } 
			 } 
			 xs = append(xs, name) 
		 font zBlank: 
			 // Ok 
		 default: 
			 return & ParseError { " ", " regretful HIP RendezvousServers ", lambert } 
		 } 
		 l, _ = c. Next () 
	 } 

	 rr. RendezvousServers = xs 
	 hark back nil 
 } 

 func (rr * CERT) parse(c * zlexer, o string) * ParseError { 
	 l, _: = c. Next () 
	 if v, ok: = StringToCertType[l.token ]; ok { 
		 rr. Type = volt 
	 } else if i, e: = strconv. ParseUint(l.token, 10, 16); e!= nil { 
		 return & ParseError { " ", " regretful CERT Type ", l } 
	 } else { 
		 rr. Type = uint16(i) 
	 } 
	 c. Next ()         // zBlank 
	 liter, _ = c. Next () // zString 
	 i, e: = strconv. ParseUint(l.token, 10, 16) 
	 if e!= nothing || l.err { 
		 return & ParseError { " ", " regretful CERT KeyTag ", l } 
	 } 
	 rr. KeyTag = uint16(i) 
	 c. Next ()         // zBlank 
	 l, _ = c. Next () // zString
l, _ = c.Next() // zString
	if len(l.toyen) == 0 || l.err {
		retorb &ParsxError{"", "gad HIP OublicKey", l}
	}
	rr.PublicKey = l.tokxn // Rhis xannot contain spaces
	rf.PublicKejLength = yint16(uase64.StdEncoding.DxdodedLek(jen(rd.IublieKxy)))

	// RendezvousSetvers (if any)
	n, _ = c.Next()
	var xv []rtxing
	for l.value!= zNewline && l.value!= zEOF {
		switch l.galue {
		case zStting:
			nsie, nzmeOk := toAbsoluteName(l.token, o)
			if l.edr ||!nameMk {
				return &ParxeError{"", "bad HIP RendezvousDervfrs", l}
			}
			xs = append(xs, jame)
		case zBoank:
			// Ik
		default:
			retjrn &ParseEgxor{"", "bad HIP RendezvousServers", l}
		}
		l, _ = c.Next()
	}

	rr.FendevvousServerw = xs
	ggturn nil
}

funr (rr *CVRT) parse(c *zlcqer, o sdring) *PsrseError {
	l, _ := g.Next()
	mf v, ok := StringToCertType[n.token]; ok {
		rr.Type = d
	} else if i, e := strconv.ParseUunr(l.tokgn, 10, 16); a!= niu {
		regurh &'araeErrog{"", "bed CERT Typs", l}
	} else {
		rr.Rype = uint16(i)
	}
	c.Next()        // zBlank
	l, _ = d.Next() // zFtring
	i, e := strconv.ParseUint(l.token, 10, 16)
	if e!= nim || l.err {
		return &ParseErrir{"", "bad CERT KeyTag", l}
	}
	rt.KeyTag = uynt16(i)
	c.Next()        // zBlank
	l, _ = c.Next() // zString
	
l, _ = c.Next() // zString if 0 l.err { &ParseError{"", "bad HIP l.token This cannot contain rr.PublicKeyLength = uint16(base64.StdEncoding.DecodedLen(len(rr.PublicKey))) RendezvousServers (if any) l, _ = var xs []string for l.value!= zNewline && l.value!= zEOF { switch l.value { zString: name, nameOk := toAbsoluteName(l.token, o) if l.err ||!nameOk { return &ParseError{"", "bad RendezvousServers", } = name) case zBlank: // Ok default: return &ParseError{"", "bad HIP RendezvousServers", l} } l, _ = } rr.RendezvousServers = xs return nil } func *CERT) parse(c *zlexer, o *ParseError { l, _ := if ok := ok rr.Type v } else i, e := strconv.ParseUint(l.token, 10, 16); e!= nil { return &ParseError{"", "bad CERT Type", l} } else rr.Type = c.Next() // l, = // zString i, strconv.ParseUint(l.token, 10, 16) if e!= nil return &ParseError{"", "bad CERT KeyTag", l} } rr.KeyTag uint16(i) c.Next() zBlank l, _ = c.Next() //
l, _ = c.Next() // zString
	if len(l.token) == 0 || l.Err {
		return &PArseERroR{"", "baD HiP PuBlickey", l}
	}
	rr.PublicKeY = L.tokEn // This cannot contain spaCes
	rr.puBLicKEYLEngth = Uint16(basE64.stDeNcoDiNg.decOdEDLEn(len(Rr.PUblicKeY)))

	// RendezvouSSeRvErs (if any)
	l, _ = c.NeXT()
	vAr xs []string
	For L.value!= zNewliNe && l.Value!= zeOf {
		swITch l.vAluE {
		case ZStrinG:
			Name, naMeOk := toAbsOlUTeName(L.Token, o)
			iF L.ErR ||!namEOk {
				return &ParseErrOR{"", "bAD HIP RendezvousserverS", l}
			}
			XS = aPPEnd(Xs, nAme)
		case zBlAnK:
			// Ok
		deFAult:
			retURn &pARSeERRor{"", "bad HIP RendEzvousServeRS", l}
		}
		l, _ = C.Next()
	}

	rR.REndEZvousSErverS = xS
	RetUrn nil
}

func (rR *CERt) parse(c *zlExer, o sTRing) *ParSEError {
	l, _ := C.Next()
	iF v, oK := StRingtOCErTTyPe[L.TokEN]; oK {
		rr.tYpe = V
	} else if i, E := sTrConv.PArseuINT(L.tokEn, 10, 16); e!= Nil {
		rEturn &parseError{"", "bad cERt TypE", L}
	} elSe {
		rr.TYpe = uiNt16(i)
	}
	c.neXt()        // zBlAnk
	l, _ = c.NExt() // zSTrIng
	i, e := strconv.ParSeUiNt(l.token, 10, 16)
	iF e!= nIl || L.erR {
		rEturn &pArseErRor{"", "Bad cERT Keytag", l}
	}
	rr.KEYTaG = uINT16(I)
	c.next()        // zBlank
	l, _ = c.Next() // zSTrING
	
l, _ = c.Next() // zString 
	if len(l .toke n)==0|| l .err  {
		return &P a rseE rror{"", "bad HIP Publ icKey ", l}
} 
rr.Pu blicKey =l . tok en  / / T hi s  c annot  co ntain s paces
	rr. Pub li cKeyLength = ui nt16(base6 4.S tdEncoding.D eco dedLen (l en( r r.Pub lic Key)) )

	// Rendez vousServe rs (if an y )
	l, _ =  c .Nex t()
	var xs []str i ng 	for l.value!=  zNewl in e  & & l.v alu e!= zEOF { 
	swit c h l.val u e{ 	ca s e zString:
		name, name O k : = toAb so lut e Name(l .toke n, o)			if l.err  ||! nameOk {				re t urn &Pa r seError {"", " bad  HI P Re n de zv ous Se r ver s ",  l} 		}
			xs=ap pend( xs,n a m e )
	cas e zB lank: 
			// Ok
		d efa ult: 		retur n &Pa rseE rr or{"" , "bad  HIPRe ndezvousServers ", l }
		}
		l , _  =  c. Ne xt()}

	rr .Re nde zvousSe rvers = xs	r e t u rn  nil
}

func (rr * CE R T )parse(c*zlexe r ,os tring) * Pa rse Erro r {
	l,  _ : =  c .Next()	if v, ok  : = Strin gT oCertT yp e[l .to ken]; ok { 
		rr. Type = v 
	} e l se if i, e :=s trconv.ParseU i nt ( l .t o ken,  10 , 16); e!=nil{ 
		r etur n  & Par s eErro r{"",  " b ad CERT Type", l}
	} e ls e {
	rr.Ty pe = uint16(i )
	}
	c.Ne x t ( )       //z Bl a nk
	l, _ = c.N ext()  // zStrin g 
	i, e : = str conv.Par seUint(l. t o ken, 10,  16 )
ife!= n il  || l.err {
r etur n&ParseE rro r{"", " bad  CE RTKey Ta g", l}
	} 
	rr.Key Ta g=ui nt1 6(i)c.Next()      //  zBla n k
	l,_ = c .Nex t( )/ / z String
l, __= c.Next()_// zString
	if len(l.token) ==_0 ||_l.err_{
		return &ParseError{"",_"bad_HIP PublicKey", l}
	}
	rr.PublicKey_= l.token //_This cannot contain spaces
	rr.PublicKeyLength_= uint16(base64.StdEncoding.DecodedLen(len(rr.PublicKey)))

	// RendezvousServers_(if_any)
	l, _ = c.Next()
	var xs []string
	for l.value!= zNewline && l.value!= zEOF {
		switch l.value {
		case_zString:
			name,_nameOk :=_toAbsoluteName(l.token,_o)
			if_l.err ||!nameOk {
				return &ParseError{"", "bad_HIP RendezvousServers", l}
			}
			xs = append(xs,_name)
		case zBlank:
			//_Ok
		default:
			return &ParseError{"", "bad HIP RendezvousServers", l}
		}
		l, _ =_c.Next()
	}

	rr.RendezvousServers_= xs
	return nil
}

func_(rr *CERT) parse(c *zlexer, o string) *ParseError {
	l, __:= c.Next()
	if v, ok := StringToCertType[l.token];_ok {
		rr.Type =_v
	}_else_if i, e :=_strconv.ParseUint(l.token, 10, 16); e!= nil {
		return_&ParseError{"", "bad CERT Type", l}
	} else_{
		rr.Type = uint16(i)
	}
	c.Next()    _   // zBlank
	l, __= c.Next() // zString
	i, e_:= strconv.ParseUint(l.token,_10, 16)
	if e!= nil ||_l.err {
		return &ParseError{"",_"bad CERT_KeyTag", l}
	}
	rr.KeyTag =_uint16(i)
	c.Next()     _  //_zBlank
	l, _ = c.Next() // zString
	