mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-31 18:38:10 +00:00 
			
		
		
		
	est_client: set 10s as the max timeout when calling the EST server
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
		| @@ -78,7 +78,7 @@ function call_est_server(path, cert, target) { | |||||||
| 	if (generate_csr(cert)) | 	if (generate_csr(cert)) | ||||||
| 		return 1; | 		return 1; | ||||||
|  |  | ||||||
| 	let ret = system('curl -X POST https://' + est_server + '/.well-known/est/' + path + ' -d @/tmp/csr.nohdr.p10 -H "Content-Type: application/pkcs10" --cert ' + cert + ' --key /etc/ucentral/key.pem --cacert /etc/ucentral/insta.pem -o /tmp/operational.nohdr.p7'); | 	let ret = system('curl -m 10 -X POST https://' + est_server + '/.well-known/est/' + path + ' -d @/tmp/csr.nohdr.p10 -H "Content-Type: application/pkcs10" --cert ' + cert + ' --key /etc/ucentral/key.pem --cacert /etc/ucentral/insta.pem -o /tmp/operational.nohdr.p7'); | ||||||
| 	if (ret) { | 	if (ret) { | ||||||
| 		ulog(LOG_INFO, 'Failed to request operational certificate\n'); | 		ulog(LOG_INFO, 'Failed to request operational certificate\n'); | ||||||
| 		return 1; | 		return 1; | ||||||
| @@ -125,7 +125,7 @@ function load_operational_ca() { | |||||||
| 		ulog(LOG_INFO, 'Operational CA is present\n'); | 		ulog(LOG_INFO, 'Operational CA is present\n'); | ||||||
| 		return 0; | 		return 0; | ||||||
| 	} | 	} | ||||||
| 	let ret = system('curl -X GET https://' + est_server + '/.well-known/est/cacerts --cert /etc/ucentral/' + cert_prefix + '.pem --key /etc/ucentral/key.pem --cacert /etc/ucentral/insta.pem -o /tmp/' + cert_prefix + '.ca.nohdr.p7'); | 	let ret = system('curl -m 10 -X GET https://' + est_server + '/.well-known/est/cacerts --cert /etc/ucentral/' + cert_prefix + '.pem --key /etc/ucentral/key.pem --cacert /etc/ucentral/insta.pem -o /tmp/' + cert_prefix + '.ca.nohdr.p7'); | ||||||
| 	if (!ret) | 	if (!ret) | ||||||
| 		ret = p7_too_pem('/tmp/' + cert_prefix + '.ca.nohdr.p7', '/etc/ucentral/' + cert_prefix + '.ca'); | 		ret = p7_too_pem('/tmp/' + cert_prefix + '.ca.nohdr.p7', '/etc/ucentral/' + cert_prefix + '.ca'); | ||||||
| 	if (ret) { | 	if (ret) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 John Crispin
					John Crispin