mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	Fix bad check
This commit is contained in:
		
							parent
							
								
									2a2ad76479
								
							
						
					
					
						commit
						f70b2ebcea
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -103,7 +103,7 @@ func (l *link) call(uri string, sintf string) error {
 | 
			
		|||
	if pubkeys, ok := u.Query()["curve25519"]; ok && len(pubkeys) > 0 {
 | 
			
		||||
		tcpOpts.pinnedCurve25519Keys = make(map[crypto.BoxPubKey]struct{})
 | 
			
		||||
		for _, pubkey := range pubkeys {
 | 
			
		||||
			if boxPub, err := hex.DecodeString(pubkey); err != nil {
 | 
			
		||||
			if boxPub, err := hex.DecodeString(pubkey); err == nil {
 | 
			
		||||
				var boxPubKey crypto.BoxPubKey
 | 
			
		||||
				copy(boxPubKey[:], boxPub)
 | 
			
		||||
				tcpOpts.pinnedCurve25519Keys[boxPubKey] = struct{}{}
 | 
			
		||||
| 
						 | 
				
			
			@ -113,7 +113,7 @@ func (l *link) call(uri string, sintf string) error {
 | 
			
		|||
	if pubkeys, ok := u.Query()["ed25519"]; ok && len(pubkeys) > 0 {
 | 
			
		||||
		tcpOpts.pinnedEd25519Keys = make(map[crypto.SigPubKey]struct{})
 | 
			
		||||
		for _, pubkey := range pubkeys {
 | 
			
		||||
			if sigPub, err := hex.DecodeString(pubkey); err != nil {
 | 
			
		||||
			if sigPub, err := hex.DecodeString(pubkey); err == nil {
 | 
			
		||||
				var sigPubKey crypto.SigPubKey
 | 
			
		||||
				copy(sigPubKey[:], sigPub)
 | 
			
		||||
				tcpOpts.pinnedEd25519Keys[sigPubKey] = struct{}{}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue