Merge pull request #112 from BNoiZe/master

Fixes and cleanup
fix has_certs == 3 which is old (it's the default which is 0)

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>