1# rnpkeys_generatekey_verifySupportedHashAlg 2 3Component 4: rnpkeys 5 6Feature 7: Generate-key 8 9## Objective 10 11Verify SupportedHashAlg. 12 13## Description 14 15The test aims to test key generation with all possible hash algorithm. 16Following hash algorithm are tested for the key generation: 17 18* `MD5` 19* `SHA-1` 20* `RIPEMD160` 21* `SHA256` 22* `SHA384` 23* `SHA512` 24* `SHA224` 25 26## Preconditions 27 28* Initialize RNP 29* Set the default value for `res`, `format`, `hash` via `rnp_setvar()`. 30 31## Test steps and expected behavior 32 331. Set the hash algorithm via `rnp_setvar` 34 351. Call the API to generate key (`rnp_generate_key`) 36 37Expectation: key is generated using options set via `rnp_setvar` 38 39## Verification steps and logic 40 411. Load the newly generated RNP keys 42 * Rationale: Ensures keys are loaded in the `rnp` control structure 43 for verification. 44 451. Find existence of key via `userId`. 46 47 * **Note**: If `userid` variable is not set, default is `always`. 48 * Rationale: Ensures the key exists by finding it. 49 50## Comments 51 52It is required to delete the old keys if the test case iterates over the 53hashing algorithm. 54 55 56# rnpkeys_generatekey_VerifyUserIdOption 57 58Component 59: rnpkeys 60 61Feature 62: Generate-key 63 64## Objective 65 66Verify `UserIdOption` 67 68## Description 69 70The test aims to test key generation with command line option `UserId`. 71 72Following different `userid`s are tested: 73 74* `rnpkeys_Generatekey_VerifyUserIdOption_MD5` 75* `rnpkeys_Generatekey_VerifyUserIdOption_SHA-1` 76* `rnpkeys_Generatekey_VerifyUserIdOption_RIPEMD160` 77* `rnpkeys_Generatekey_VerifyUserIdOption_SHA256` 78* `rnpkeys_Generatekey_VerifyUserIdOption_SHA384` 79* `rnpkeys_Generatekey_VerifyUserIdOption_SHA512` 80* `rnpkeys_Generatekey_VerifyUserIdOption_SHA224` 81 82 83## Preconditions 84 85* Initialize RNP 86* Set the default value for res, format, hash via `rnp_setvar`. 87 88## Test steps and expected behavior 89 901. Set the userId via `rnp_setvar` 91 921. Call the API to generate key (`rnp_generate_key`) 93 94Expectation: key is generated using options set via `rnp_setvar` 95 96## Verification steps and logic 97 981. Load the newly generated RNP keys 99 * Rationale: Ensures keys are loaded in the rnp control structure for 100 verification. 101 1021. Find the existence of the key via finding the key with the userId. 103 104 105# rnpkeys_generatekey_verifykeyRingOptions 106 107Component 108: rnpkeys 109 110Feature 111: Generate-key 112 113## Objective 114 115Verify keyRingOptions. 116 117## Description 118 119The test aims to test key generation with the user specified keyring. 120 121## Preconditions 122 123* Initialize RNP 124* Set the default value for `res`, `format`, `hash` via `rnp_setvar()`. 125 126## Test steps and expected behavior 127 1281. Set the keyring via `rnp_setvar` 129 1301. Call the API to generate key (`rnp_generate_key`) 131 132Expectation: key is generated using options set via `rnp_setvar` 133 134## Verification steps and logic 135 1361. Delete the default keyring i.e. `pubring.gpg` and `secring.gpg` found 137 in the homedir 138 139 * Rationale: To ensure that default keyring is **NOT** available. 140 1411. Load the newly generated RNP keys 142 143 * Rationale: Ensures keys are loaded in the `rnp` control structure 144 for verification. 145 1461. Find existence of key via `userId`. 147 148 * **Note**: If `userid` variable is not set, default is `always`. 149 * Rationale: Ensures the key exists by finding it. 150 151 152# rnpkeys_generatekey_verifykeyHomeDirOption 153 154Component 155: rnpkeys 156 157Feature 158: Generate-key 159 160## Objective 161 162Verify keyHomeDirOption. 163 164## Description 165 166The test aims to test key generation with the user specified keyring. 167 168## Preconditions 169 170* Create new home dir with read/write permissions. 171* Delete the keys (if any) in the previous default directory. 172* Initialize RNP 173* Set the default value for `res`, `format`, `hash` via `rnp_setvar()`. 174 175## Test steps and expected behavior 176 1771. Call the API to generate key (`rnp_generate_key`) 178 179Expectation: key is generated using options set via `rnp_setvar` 180 181## Verification steps and logic 182 1831. Load the newly generated RNP keys 184 185 * Rationale: Ensures keys are loaded in the rnp control structure for 186 verification. 187 1881. Find existence of key via `userId`. 189 190 * **Note**: If `userid` variable is not set, default is `always`. 191 * Rationale: Ensures the key exists by finding it. 192 193