Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion lib/openpgp/packet/signature.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/openpgp/packet/signature.iced
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,15 @@ class Experimental extends SubPacket

#------------

# Ignore unless critical.
class Unknown extends SubPacket
constructor : (@buf, @type) ->
@parse : (slice, type) ->
new Unknown slice.consume_rest_to_buffer(), type
_v_to_buffer : () -> @buf

#------------

class Time extends SubPacket
constructor : (type, @time) ->
@never_expires = (@time is 0)
Expand Down Expand Up @@ -809,6 +818,7 @@ class Parser
when S.preferred_aead_algos then PreferredAEADAlgorithms
else
if type >= S.experimental_low and type <= S.experimental_high then Experimental
else if not critical then Unknown
else throw new Error "Unknown signature subpacket: #{type}"
ret = klass.parse @slice, type
ret.set_opts { critical, five_byte_len }
Expand Down