Stub out signature subpacket parsing in PGPPacket
authorW. Trevor King <wking@tremily.us>
Fri, 20 Dec 2013 21:09:25 +0000 (13:09 -0800)
committerW. Trevor King <wking@tremily.us>
Mon, 23 Dec 2013 02:31:20 +0000 (18:31 -0800)
commit8eea0dbc87dca1fa72e0d2defb08b094a52137fb
tree3f4846c8325be9c4657815c713070d68cab1d81f
parenta4786baadfd0db944cab5c31fc5cb37006fc9733
Stub out signature subpacket parsing in PGPPacket

From RFC 4880 [1]:

   Each subpacket consists of a subpacket header and a body.  The
   header consists of:

     - the subpacket length (1, 2, or 5 octets),
     - the subpacket type (1 octet),

   and is followed by the subpacket-specific data.

   The length includes the type octet but not this length.  Its format
   is similar to the "new" format packet header lengths, but cannot
   have Partial Body Lengths.  That is:

       if the 1st octet <  192, then
           lengthOfLength = 1
           subpacketLen = 1st_octet

       if the 1st octet >= 192 and < 255, then
           lengthOfLength = 2
           subpacketLen = ((1st_octet - 192) << 8) + (2nd_octet) + 192

       if the 1st octet = 255, then
           lengthOfLength = 5
           subpacket length = [four-octet scalar starting at 2nd_octet]

   The value of the subpacket type octet may be:

            0 = Reserved
            1 = Reserved
            2 = Signature Creation Time
            3 = Signature Expiration Time
            4 = Exportable Certification
            5 = Trust Signature
            6 = Regular Expression
            7 = Revocable
            8 = Reserved
            9 = Key Expiration Time
           10 = Placeholder for backward compatibility
           11 = Preferred Symmetric Algorithms
           12 = Revocation Key
           13 = Reserved
           14 = Reserved
           15 = Reserved
           16 = Issuer
           17 = Reserved
           18 = Reserved
           19 = Reserved
           20 = Notation Data
           21 = Preferred Hash Algorithms
           22 = Preferred Compression Algorithms
           23 = Key Server Preferences
           24 = Preferred Key Server
           25 = Primary User ID
           26 = Policy URI
           27 = Key Flags
           28 = Signer's User ID
           29 = Reason for Revocation
           30 = Features
           31 = Signature Target
           32 = Embedded Signature
   100 To 110 = Private or experimental

[1]: http://tools.ietf.org/search/rfc4880#section-5.2.3.1
gpg-migrate.py