1
0
mirror of https://github.com/Yubico/yubico-pam.git synced 2025-02-20 12:54:16 +01:00

add a test for authfile user with two ok public ids

This commit is contained in:
Klas Lindfors 2015-01-20 09:17:45 +01:00
parent c5489c93c5
commit 4ab78f54b5
2 changed files with 15 additions and 0 deletions

View File

@ -1 +1,2 @@
foo:vvincredible
test:cccccccfhcbe:ccccccbchvth:

View File

@ -151,6 +151,16 @@ static int test_authenticate2(void) {
return pam_sm_authenticate(0, 0, sizeof(cfg) / sizeof(char*), cfg);
}
static int test_authenticate3(void) {
const char *cfg[] = {
"id=1",
"urllist=http://localhost:"YKVAL_PORT1"/wsapi/2/verify",
"authfile=aux/authfile",
"debug",
};
return pam_sm_authenticate(4, 0, sizeof(cfg) / sizeof(char*), cfg);
}
static int test_fail_authenticate1(void) {
const char *cfg[] = {
"id=1",
@ -255,6 +265,10 @@ int main(void) {
goto out;
}
#endif
if(test_authenticate3() != PAM_SUCCESS) {
ret = 10;
goto out;
}
out:
kill(child, 9);