File: test-trust.sh

package info (click to toggle)
p11-kit 0.26.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,088 kB
  • sloc: ansic: 73,585; sh: 7,776; xml: 1,953; makefile: 1,200; python: 675; sed: 39
file content (26 lines) | stat: -rwxr-xr-x 667 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

test "${abs_top_builddir+set}" = set || {
	echo "set abs_top_builddir" 1>&2
	exit 1
}

. "$abs_top_builddir/common/test-init.sh"

test_disable_in_proxy()
{
	: ${PKCS11_TOOL=pkcs11-tool}
	if ! (type ${PKCS11_TOOL}) > /dev/null 2>&1; then
		skip "pkcs11-tool not found"
	fi
	: ${PKG_CONFIG=pkg-config}
	if ! (type ${PKG_CONFIG}) > /dev/null 2>&1; then
		skip "pkg-config not found"
	fi
	proxy_module=$(${PKG_CONFIG} --variable=proxy_module p11-kit-1)
	if ${PKCS11_TOOL} --module="$proxy_module" -T | grep '^ *token model *: *p11-kit-trust' > /dev/null 2>&1; then
		assert_fail "p11-kit-trust is not disabled in proxy module"
	fi
}

run test_disable_in_proxy