certificate.Store: Support "*" wildcard pattern
This commit is contained in:
		
							parent
							
								
									423914d6e0
								
							
						
					
					
						commit
						d479c6391c
					
				@ -89,6 +89,10 @@ func (s *Store) GetCertificate(scope string) (*tls.Certificate, error) {
 | 
			
		||||
			cert, ok = s.Lookup("*." + wildcard[1])
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	if !ok {
 | 
			
		||||
		// Try "*"
 | 
			
		||||
		_, ok = s.Lookup("*")
 | 
			
		||||
	}
 | 
			
		||||
	if !ok {
 | 
			
		||||
		return nil, errors.New("unrecognized scope")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user