[ba6027a] | 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 | # |
---|
| 7 | echo " " |
---|
| 8 | echo ">>>> keycheck the encrypted private key (with passphrase file) ..." |
---|
| 9 | creddy --keycheck --key enc_private.pem --p=pfile |
---|
| 10 | echo " " |
---|
| 11 | |
---|
| 12 | echo ">>>> generate a regular abac private key ..." |
---|
| 13 | creddy --generate --cn abc |
---|
| 14 | echo " " |
---|
| 15 | echo ">>>> keycheck the regular private key ..." |
---|
| 16 | creddy --keycheck --key abc_private.pem |
---|
| 17 | echo " " |
---|
| 18 | echo ">>>> attr check the regular id credential ..." |
---|
| 19 | creddy --display --show=issuer,subject --cert abc_ID.pem |
---|
| 20 | echo " " |
---|
| 21 | echo ">>>> verify check the regular id credential ..." |
---|
| 22 | creddy --verify --cert abc_ID.pem |
---|
| 23 | echo " " |
---|
| 24 | |
---|
| 25 | echo ">>>> generate an id credential using encrypted private key ..." |
---|
| 26 | creddy --generate --cn abcE --key enc_private.pem --p=pfile |
---|
| 27 | echo " " |
---|
| 28 | echo ">>>> attr check the id credential ..." |
---|
| 29 | creddy --display --show=issuer,subject --cert abcE_ID.pem |
---|
| 30 | echo " " |
---|
| 31 | echo ">>>> verify check the id credential ..." |
---|
| 32 | creddy --verify --cert abcE_ID.pem |
---|
| 33 | echo " " |
---|
| 34 | |
---|
| 35 | echo ">>>> generate an id credential, reusing the regular private key ..." |
---|
| 36 | creddy --generate --cn abcN --key abc_private.pem |
---|
| 37 | echo " " |
---|
| 38 | echo ">>>> attr check the regular id credential ..." |
---|
| 39 | creddy --display --show=issuer,subject --cert abcN_ID.pem |
---|
| 40 | echo " " |
---|
| 41 | echo ">>>> verify check the regular id credential ..." |
---|
| 42 | creddy --verify --cert abcN_ID.pem |
---|
| 43 | echo " " |
---|
| 44 | |
---|
| 45 | echo ">>>> expected failure case ..." |
---|
| 46 | creddy --generate --cn abc2 --key enc_private.pem --p=pbadfile |
---|
| 47 | echo " " |
---|
| 48 | echo ">>>> expected failure case ..." |
---|
| 49 | creddy --generate --cn abc3 --key bad_enc_private.pem --p=pfile |
---|
| 50 | |
---|