diff options
author | 2017-04-21 12:13:25 +0800 | |
---|---|---|
committer | 2017-04-21 13:55:18 +0800 | |
commit | 1f8e4ddcc850e59909778cc583811353f338001a (patch) | |
tree | 3d417afbbbaa319af75eed46d81d0e17c5dc5f0c /resources/roles/openssl | |
parent | da1b699e26f5b876c784ced944ec625b17511b7a (diff) |
Add AES testing in SSL metrics
Change-Id: Iee1b1711d9ce07c468bc390966c55bd49abea228
Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'resources/roles/openssl')
-rw-r--r-- | resources/roles/openssl/tasks/main.yml | 34 | ||||
-rw-r--r-- | resources/roles/openssl/templates/ssl-metrics.j2 | 26 |
2 files changed, 43 insertions, 17 deletions
diff --git a/resources/roles/openssl/tasks/main.yml b/resources/roles/openssl/tasks/main.yml index 42efbeb4..7975c177 100644 --- a/resources/roles/openssl/tasks/main.yml +++ b/resources/roles/openssl/tasks/main.yml @@ -16,11 +16,11 @@ command: openssl speed rsa register: openssl_rsa_log -#- name: AES speed measurement -# command: openssl speed -evp aes-128-cbc -# register: openssl_aes_log +- name: AES speed measurement + command: openssl speed -evp aes-128-cbc + register: openssl_aes_log -- name: collect ssl metrics from openssl +- name: collect ssl rsa metrics collect: string: "{{ openssl_rsa_log.stdout }}" patterns: @@ -40,18 +40,22 @@ ^rsa\s+4096\sbits\s.+\s+ ?(?P<rsa_sign_4096>\d+\.\d)\s+ ?(?P<rsa_verify_4096>\d+\.\d)$ - dump: openssl_rsa_log - register: openssl_rsa_metrics + dump: openssl_rsa.log + register: ssl_rsa_metrics -# - filename: AES-128-CBC_dump -# grep: -# - |- -# ^aes-128-cbc\s+ -# ?(?P<aes_128_cbc_16_bytes>\d+\.\w+)\s+ -# ?(?P<aes_128_cbc_64_bytes>\d+\.\w+)\s+ -# ?(?P<aes_128_cbc_256_bytes>\d+\.\w+)\s+ -# ?(?P<aes_128_cbc_1024_bytes>\d+\.\w+)\s+ -# ?(?P<aes_128_cbc_8192_bytes>\d+\.\w+)$ +- name: collect ssl aes metrics + collect: + string: "{{ openssl_aes_log.stdout }}" + patterns: + - |- + ^aes-128-cbc\s+ + ?(?P<aes_128_cbc_16_bytes>\d+\.\w+)\s+ + ?(?P<aes_128_cbc_64_bytes>\d+\.\w+)\s+ + ?(?P<aes_128_cbc_256_bytes>\d+\.\w+)\s+ + ?(?P<aes_128_cbc_1024_bytes>\d+\.\w+)\s+ + ?(?P<aes_128_cbc_8192_bytes>\d+\.\w+)$ + dump: openssl_aes.log + register: ssl_aes_metrics - name: create SSL report template: diff --git a/resources/roles/openssl/templates/ssl-metrics.j2 b/resources/roles/openssl/templates/ssl-metrics.j2 index 8dedf352..6f8f8c71 100644 --- a/resources/roles/openssl/templates/ssl-metrics.j2 +++ b/resources/roles/openssl/templates/ssl-metrics.j2 @@ -1,3 +1,25 @@ -SSL -=== +SSL metrics +=========== +{{ ('Tool', 'openssl')|justify }} + +RSA +--- + +{{ ('Sign 512 bits', ssl_rsa_metrics.rsa_sign_512)|justify }} +{{ ('Verify 512 bits', ssl_rsa_metrics.rsa_verify_512)|justify }} +{{ ('Sign 1024 bits', ssl_rsa_metrics.rsa_sign_1024)|justify }} +{{ ('Verify 1024 bits', ssl_rsa_metrics.rsa_verify_1024)|justify }} +{{ ('Sign 2048 bits', ssl_rsa_metrics.rsa_sign_2048)|justify }} +{{ ('Verify 2048 bits', ssl_rsa_metrics.rsa_verify_2048)|justify }} +{{ ('Sign 4096 bits', ssl_rsa_metrics.rsa_sign_4096)|justify }} +{{ ('Verify 4096 bits', ssl_rsa_metrics.rsa_verify_4096)|justify }} + +AES +--- + +{{ ('128 CBC 16 bytes', ssl_aes_metrics.aes_128_cbc_16_bytes)|justify }} +{{ ('128 CBC 64 bytes', ssl_aes_metrics.aes_128_cbc_64_bytes)|justify }} +{{ ('128 CBC 256 bytes', ssl_aes_metrics.aes_128_cbc_256_bytes)|justify }} +{{ ('128 CBC 1024 bytes', ssl_aes_metrics.aes_128_cbc_1024_bytes)|justify }} +{{ ('128 CBC 8192 bytes', ssl_aes_metrics.aes_128_cbc_8192_bytes)|justify }} |