summaryrefslogtreecommitdiff
path: root/generate-wireshark-cs
diff options
context:
space:
mode:
authorPeter Wu <lekensteyn@gmail.com>2013-09-19 11:18:10 +0200
committerPeter Wu <lekensteyn@gmail.com>2013-09-19 13:29:33 +0200
commit18707dc674c5717eb04ed108a683396c5dc7e63b (patch)
tree7b5303c353a3f72d8d872b08fcef859d86d0ce13 /generate-wireshark-cs
parent5f52e65f4bd7d72f760af19f3d246bfcba643417 (diff)
downloadwireshark-notes-18707dc674c5717eb04ed108a683396c5dc7e63b.tar.gz
Distinguish GCM ciphers, fix RC2 type
RC2 is a block, not a stream. I thought I fixed this some time ago...
Diffstat (limited to 'generate-wireshark-cs')
-rwxr-xr-xgenerate-wireshark-cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/generate-wireshark-cs b/generate-wireshark-cs
index 5814fd9..4bc1fa1 100755
--- a/generate-wireshark-cs
+++ b/generate-wireshark-cs
@@ -102,6 +102,8 @@ p() {
;;
esac
+ # GCM's IV size is always 4 regardless of underlying block cipher
+ [[ $1 == *_GCM_* ]] && blocksize=4 ||
case $cipher in
AES|AES256|CAMELLIA128|CAMELLIA256|SEED)
blocksize=16 ;;
@@ -136,11 +138,11 @@ p() {
warn "Export cipher, actual keysize may not be accurate: $hexid $1"
fi
- # mode=STREAM
+ [[ $1 == *_GCM_* ]] && mode=GCM ||
case $cipher in
- AES|AES256|DES|3DES|CAMELLIA128|CAMELLIA256|SEED|IDEA)
+ AES|AES256|DES|3DES|CAMELLIA128|CAMELLIA256|SEED|IDEA|RC2)
mode=CBC ;;
- RC2|RC4|NULL)
+ RC4|NULL)
mode=STREAM ;;
*)
warn "Unknown mode in $hexid $1 (cipher=$cipher)"