mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-30 06:38:37 -04:00 
			
		
		
		
	Use caddy's certmagic library for extensible/robust ACME handling (#14177)
* use certmagic for more extensible/robust ACME cert handling * accept TOS based on config option Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
		
							
								
								
									
										32
									
								
								vendor/github.com/miekg/dns/fuzz.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								vendor/github.com/miekg/dns/fuzz.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,32 @@ | ||||
| // +build fuzz | ||||
|  | ||||
| package dns | ||||
|  | ||||
| import "strings" | ||||
|  | ||||
| func Fuzz(data []byte) int { | ||||
| 	msg := new(Msg) | ||||
|  | ||||
| 	if err := msg.Unpack(data); err != nil { | ||||
| 		return 0 | ||||
| 	} | ||||
| 	if _, err := msg.Pack(); err != nil { | ||||
| 		return 0 | ||||
| 	} | ||||
|  | ||||
| 	return 1 | ||||
| } | ||||
|  | ||||
| func FuzzNewRR(data []byte) int { | ||||
| 	str := string(data) | ||||
| 	// Do not fuzz lines that include the $INCLUDE keyword and hint the fuzzer | ||||
| 	// at avoiding them. | ||||
| 	// See GH#1025 for context. | ||||
| 	if strings.Contains(strings.ToUpper(str), "$INCLUDE") { | ||||
| 		return -1 | ||||
| 	} | ||||
| 	if _, err := NewRR(str); err != nil { | ||||
| 		return 0 | ||||
| 	} | ||||
| 	return 1 | ||||
| } | ||||
		Reference in New Issue
	
	Block a user