Set certificate automatically also in openconnect call, if one is set in gp-okta.conf for the requests-dance

This commit is contained in:
Tino Lange
2019-06-07 09:37:21 +02:00
parent 0c1905092b
commit fab69fe18c
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -490,6 +490,8 @@ def main():
cmd = conf.get('openconnect_cmd') or 'openconnect'
cmd += ' --protocol=gp -u \'{0}\''
cmd += ' --usergroup {1}'
if conf.get('cert'):
cmd += ' --certificate=\'{0}\''.format(conf.get('cert'))
cmd += ' --passwd-on-stdin ' + conf.get('openconnect_args', '') + ' \'{2}\''
cmd = cmd.format(username, cookie_type, conf.get('vpn_url'))
gw = (conf.get('gateway') or '').strip()