summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-pkcs1.h
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2015-07-03 19:47:00 +0200
committerPeter Wu <peter@lekensteyn.nl>2015-07-03 20:01:08 +0200
commita17875824df9b1cf76826cc5be300d9d6d3a61a3 (patch)
tree7c1a824c5ade66ad267356f76668ca29031c5eca /epan/dissectors/packet-pkcs1.h
parentbd6065f13f41a53ea4b3290500e6ce3462524eac (diff)
downloadwireshark-a17875824df9b1cf76826cc5be300d9d6d3a61a3.tar.gz
[WIP] x509af: dissect subjectPublicKeyx509-subjectpublickey
The subjectPublicKey field of a Certificate (TBSCertificate) is defined as type BIT STRING. The actual contents depend on the Algorithm Identifier which is preceding the subjectPublicKey field. This patch (aims to) add(s) support for dissection of the public key. Notes: Currently only RSA is "half-working" and dissected as: subjectPublicKeyInfo algorithm (rsaEncryption) Algorithm Id: 1.2.840.113549.1.1.1 (rsaEncryption) subjectPublicKey: 3082010a0282010100b7c769e2d0eacaeb929fc08238a9ff... modulus : 0x00b7c769e2d0eacaeb929fc08238a9ffc59cab39c28a2e26... publicExponent: 65537 It should probably become: subjectPublicKeyInfo algorithm (rsaEncryption) Algorithm Id: 1.2.840.113549.1.1.1 (rsaEncryption) subjectPublicKey RSAPublicKey modulus : ... publicExponent: 65537 Right now DSA and DH keys are displayed instead of subjectPublicKey due to the hf_id reuse. These should get a new hf ID instead. TODO: - Add public key dissections below the BIT STRING subtree. This might require API changes to dissect_ber_bitstring. - Import PKIX1Algorithms2008 module from RFC 5480 (Elliptic Curve Cryptography Subject Public Key Information) which is based on the PKIX1Algorithms88 module from RFC 3279). Then import DSA, DH and others from it. This is more correct than exporting it from the PKCS#1 module. - Check field names, right now these are displayed as a rather useless/generic BER integer field (for the DH and DSA params). Change-Id: Ib92645433b0a0078a947ff0ac26c5e6a64877b93
Diffstat (limited to 'epan/dissectors/packet-pkcs1.h')
-rw-r--r--epan/dissectors/packet-pkcs1.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/epan/dissectors/packet-pkcs1.h b/epan/dissectors/packet-pkcs1.h
index b056fee21a..d7542ff22a 100644
--- a/epan/dissectors/packet-pkcs1.h
+++ b/epan/dissectors/packet-pkcs1.h
@@ -38,6 +38,8 @@
int dissect_pkcs1_RSAPublicKey(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
int dissect_pkcs1_RSAPrivateKey(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
int dissect_pkcs1_DigestInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_pkcs1_DSAPublicKey(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_pkcs1_DHPublicKey(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
/*--- End of included file: packet-pkcs1-exp.h ---*/
#line 28 "../../asn1/pkcs1/packet-pkcs1-template.h"