blob: 6f1eb7dc49a59e3816e939a8971ac3e4d6770cd7 [file] [log] [blame]
Rahul Maheshwarid4d43fc2019-06-24 00:54:19 -05001*** Settings ***
2Documentation Module to test IPMI chipher functionality.
3Resource ../lib/ipmi_client.robot
4Resource ../lib/openbmc_ffdc.robot
5Library ../lib/ipmi_utils.py
George Keishing45511e82019-10-15 01:26:55 -05006Library ../lib/var_funcs.py
Rahul Maheshwarid4d43fc2019-06-24 00:54:19 -05007Variables ../data/ipmi_raw_cmd_table.py
George Keishing45511e82019-10-15 01:26:55 -05008Library String
Rahul Maheshwarid4d43fc2019-06-24 00:54:19 -05009
George Keishing45511e82019-10-15 01:26:55 -050010Test Setup Printn
Rahul Maheshwarid4d43fc2019-06-24 00:54:19 -050011Test Teardown FFDC On Test Case Fail
12
Rahul Maheshwarid4d43fc2019-06-24 00:54:19 -050013*** Test Cases ***
14
George Keishing45511e82019-10-15 01:26:55 -050015Verify Supported Ciphers
16 [Documentation] Execute all supported ciphers and verify.
17 [Tags] Verify_Supported_Ciphers
18 FOR ${cipher} IN @{valid_ciphers}
19 Run External IPMI Standard Command power status C=${cipher}
20 END
Rahul Maheshwarid4d43fc2019-06-24 00:54:19 -050021
22
George Keishing45511e82019-10-15 01:26:55 -050023Verify Unsupported Ciphers
24 [Documentation] Execute all unsupported ciphers and verify error.
25 [Tags] Verify_Unsupported_Ciphers
26 FOR ${cipher} IN @{unsupported_ciphers}
27 Run Keyword And Expect Error *invalid * algorithm*
28 ... Run External IPMI Standard Command power status C=${cipher}
29 END
Rahul Maheshwarid4d43fc2019-06-24 00:54:19 -050030
31
George Keishing45511e82019-10-15 01:26:55 -050032Verify Supported Ciphers Via Lan Print
33 [Documentation] Verify supported ciphers via IPMI lan print command.
34 [Tags] Verify_Supported_Ciphers_Via_Lan_Print
35
36 ${lan_print}= Get Lan Print Dict
Rahul Maheshwarid4d43fc2019-06-24 00:54:19 -050037 # Example 'RMCP+ Cipher Suites' entry: 3,17
George Keishing45511e82019-10-15 01:26:55 -050038 ${ciphers}= Split String ${lan_print['RMCP+ Cipher Suites']} ,
39 Rprint Vars ciphers
40 Valid List ciphers valid_values=${valid_ciphers}
Rahul Maheshwarid4d43fc2019-06-24 00:54:19 -050041
42
43Verify Supported Cipher Via Getciphers
George Keishingfc3d8f12022-03-24 10:57:31 -050044 [Documentation] Verify supported ciphers via IPMI getciphers command.
Rahul Maheshwarid4d43fc2019-06-24 00:54:19 -050045 [Tags] Verify_Supported_Cipher_Via_Getciphers
Rahul Maheshwarid4d43fc2019-06-24 00:54:19 -050046
George Keishing45511e82019-10-15 01:26:55 -050047 # Example output from 'Channel Getciphers IPMI':
48 # ipmi_channel_ciphers:
49 # [0]:
50 # [id]: 3
51 # [iana]: N/A
52 # [auth_alg]: hmac_sha1
53 # [integrity_alg]: hmac_sha1_96
54 # [confidentiality_alg]: aes_cbc_128
55 # [1]:
56 # [id]: 17
57 # [iana]: N/A
58 # [auth_alg]: hmac_sha256
59 # [integrity_alg]: sha256_128
60 # [confidentiality_alg]: aes_cbc_128
Rahul Maheshwarid4d43fc2019-06-24 00:54:19 -050061
George Keishing45511e82019-10-15 01:26:55 -050062 ${ipmi_channel_ciphers}= Channel Getciphers IPMI
63 # Example cipher entry: 3 17
64 Rprint Vars ipmi_channel_ciphers
65 ${ipmi_channel_cipher_ids}= Nested Get id ${ipmi_channel_ciphers}
66 Rpvars ipmi_channel_cipher_ids
67 Valid List ipmi_channel_cipher_ids valid_values=${valid_ciphers}