source: examples/passphrase_tests/creddy/creddy_test_auto @ 20eaefe

mei_rt2mei_rt2_fix_1
Last change on this file since 20eaefe was ba6027a, checked in by Mei <mei@…>, 12 years ago

1) modified code all around to add support for encrypted private key for

ID credential

2) add new abac_key_t structure (abac_key.c)
3) add new keycheck option to creddy
4) add 2 new test suites

  • Property mode set to 100755
File size: 1.7 KB
Line 
1
2
3#########################################################################
4# test different creddy calls using encrypted private key generated
5# eternal openssl call. must have a premade enc_private.pem !!!
6#
7echo "  "
8echo ">>>>  keycheck the encrypted private key (with passphrase file) ..."
9creddy --keycheck --key enc_private.pem --p=pfile
10echo "  "
11
12echo ">>>>  generate a regular abac private key ..."
13creddy --generate --cn abc
14echo "  "
15echo ">>>>  keycheck the regular private key ..."
16creddy --keycheck --key abc_private.pem
17echo "  "
18echo ">>>>  attr check the regular id credential ..."
19creddy --display --show=issuer,subject --cert abc_ID.pem
20echo "  "
21echo ">>>>  verify check the regular id credential ..."
22creddy --verify --cert abc_ID.pem
23echo "  "
24
25echo ">>>>  generate an id credential using encrypted private key ..."
26creddy --generate --cn abcE --key enc_private.pem --p=pfile
27echo "  "
28echo ">>>>  attr check the id credential ..."
29creddy --display --show=issuer,subject --cert abcE_ID.pem
30echo "  "
31echo ">>>>  verify check the id credential ..."
32creddy --verify --cert abcE_ID.pem
33echo "  "
34
35echo ">>>>  generate an id credential, reusing the regular private key ..."
36creddy --generate --cn abcN --key abc_private.pem
37echo "  "
38echo ">>>>  attr check the regular id credential ..."
39creddy --display --show=issuer,subject --cert abcN_ID.pem
40echo "  "
41echo ">>>>  verify check the regular id credential ..."
42creddy --verify --cert abcN_ID.pem
43echo "  "
44
45echo ">>>>  expected failure case ..."
46creddy --generate --cn abc2 --key enc_private.pem --p=pbadfile
47echo "  "
48echo ">>>>  expected failure case ..."
49creddy --generate --cn abc3 --key bad_enc_private.pem --p=pfile
50
Note: See TracBrowser for help on using the repository browser.