Skip to content

Commit

Permalink
Fixes #279: Splitted certificate configuration items for VMRay analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
3c7 committed Jun 8, 2018
1 parent d3b6ccf commit 2194349
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
11 changes: 9 additions & 2 deletions analyzers/VMRay/VMRay.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,23 @@
"required": true
},
{
"name": "certpath",
"name": "certverify",
"description": "Verify certificates",
"type": "boolean",
"multi": false,
"required": true,
"defaultValue": true
},
{
"name": "certpath",
"description": "Path to certificate file, in case of self-signed etc.",
"type": "string",
"multi": false,
"required": false
},
{
"name": "disablereanalyze",
"description": "Define if reanalyze is required or not",
"description": "If set to true, samples won't get re-analyzed.",
"type": "boolean",
"multi": false,
"required": false,
Expand Down
7 changes: 6 additions & 1 deletion analyzers/VMRay/vmray.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ def __init__(self):
reanalyze = False
else:
reanalyze = True

verify = self.get_param('config.certverify', None, 'Certificate verification parameter is missing.')
certpath = self.get_param('config.certpath', None)
if verify and certpath:
verify = certpath
self.vmrc = VMRayClient(url=self.url,
key=self.get_param('config.key', None, 'No VMRay API key given.'),
cert=self.get_param('config.certpath', True),
cert=verify,
reanalyze=reanalyze)

def run(self):
Expand Down

0 comments on commit 2194349

Please sign in to comment.