Skip to content
Snippets Groups Projects
Commit a2990f21 authored by Libor Peltan's avatar Libor Peltan Committed by Daniel Salzman
Browse files

test: skip deterministic DSA if gnutls old

parent 78035897
No related branches found
No related tags found
1 merge request!1127Deterministic dsa
......@@ -10,6 +10,25 @@ import os.path
from dnstest.test import Test
from dnstest.keys import Keymgr
from dnstest.utils import Skip
def gnutls_ver_num():
try:
gnutls_h = "/usr/include/gnutls/gnutls.h"
with open(gnutls_h, "r") as gh_file:
for gh_line in gh_file:
gh = gh_line.split()
if len(gh) == 3 and gh[0] == "#define" and gh[1] == "GNUTLS_VERSION_NUMBER":
return int(gh[2], 0)
except:
return None
return None
gvn = gnutls_ver_num()
if gvn is None:
raise Skip("GNUTLS detect failed")
if gvn < 0x03060a:
raise Skip("GNUTLS < 3.6.10")
t = Test()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment