list
This commit is contained in:
		
							parent
							
								
									4429072e0c
								
							
						
					
					
						commit
						5cf96d8ab3
					
				
							
								
								
									
										12
									
								
								src/http.go
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								src/http.go
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -79,12 +79,24 @@ func getCert(c *gin.Context) {
 | 
			
		|||
	}
 | 
			
		||||
	key := string(keyContent)
 | 
			
		||||
 | 
			
		||||
	certInfoFilePath := path.Join(dir, CertInfoFileName)
 | 
			
		||||
	certInfoContent, err := os.ReadFile(certInfoFilePath)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		c.JSON(200, gin.H{
 | 
			
		||||
			"code": 500,
 | 
			
		||||
			"msg":  "Failed to read cert info file.",
 | 
			
		||||
		})
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	certInfo := string(certInfoContent)
 | 
			
		||||
 | 
			
		||||
	c.JSON(200, gin.H{
 | 
			
		||||
		"code": 200,
 | 
			
		||||
		"msg":  "Success",
 | 
			
		||||
		"data": gin.H{
 | 
			
		||||
			"crt":  encryptResult(crt, token),
 | 
			
		||||
			"key":  encryptResult(key, token),
 | 
			
		||||
			"info": encryptResult(certInfo, token),
 | 
			
		||||
		},
 | 
			
		||||
	})
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user