x509af: dissect subjectPublicKey for RSA
authorPeter Wu <peter@lekensteyn.nl>
Tue, 15 Sep 2015 21:24:26 +0000 (23:24 +0200)
committerMichael Mann <mmann78@netscape.net>
Sun, 18 Oct 2015 03:30:21 +0000 (03:30 +0000)
commit317af2c68ce1db0599fb0082cf454a451ff74c20
tree6abe0d7fab3d0483f43acdfc78fe7673d06f2703
parent48d46e67fd7938262df658c0b459e2e926faa9ab
x509af: dissect subjectPublicKey for RSA

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 adds support for dissection of the public key for RSA
public keys which show up below the subjectPublicKey tree:

    subjectPublicKeyInfo
        algorithm (rsaEncryption)
            Algorithm Id: 1.2.840.113549.1.1.1 (rsaEncryption)
        subjectPublicKey: 3082010a0282010100b7c769e2d0eacaeb929fc08238a9ff...
            modulus : 0x00b7c769e2d0eacaeb929fc08238a9ffc59cab39c28a2e26...
            publicExponent: 65537

Change-Id: Ib92645433b0a0078a947ff0ac26c5e6a64877b93
Reviewed-on: https://code.wireshark.org/review/10967
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
asn1/pkcs1/pkcs1.cnf
asn1/x509af/packet-x509af-template.c
asn1/x509af/x509af.cnf
epan/dissectors/packet-pkcs1.c
epan/dissectors/packet-x509af.c