mirror of
				https://github.com/minio/minio.git
				synced 2025-10-29 15:55:00 -04:00 
			
		
		
		
	fix: a crash in KMS cert reload function (#16158)
This commit is contained in:
		
							parent
							
								
									98cffbce03
								
							
						
					
					
						commit
						9b35c72349
					
				| @ -102,12 +102,12 @@ func NewWithConfig(config Config) (KMS, error) { | ||||
| 				if !ok { | ||||
| 					return | ||||
| 				} | ||||
| 				sameCert := true | ||||
| 				sameCert := len(certificate.Certificate) == len(prevCertificate.Certificate) | ||||
| 				for i, b := range certificate.Certificate { | ||||
| 					if !bytes.Equal(b, prevCertificate.Certificate[i]) { | ||||
| 						sameCert = false | ||||
| 					if !sameCert { | ||||
| 						break | ||||
| 					} | ||||
| 					sameCert = sameCert && bytes.Equal(b, prevCertificate.Certificate[i]) | ||||
| 				} | ||||
| 				// Do not reload if its the same cert as before. | ||||
| 				if !sameCert { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user