mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-25 20:19:18 -05:00
openpgp: '&openpgp-unrecognized-packet-error' includes type tag.
* guix/openpgp.scm (&openpgp-unrecognized-packet-error)[type]: New field. (get-data, parse-subpackets): Initialize 'type' field.
This commit is contained in:
parent
f73f3d01a2
commit
37a8f5b281
1 changed files with 5 additions and 1 deletions
|
@ -34,6 +34,7 @@ (define-module (guix openpgp)
|
||||||
openpgp-error?
|
openpgp-error?
|
||||||
openpgp-unrecognized-packet-error?
|
openpgp-unrecognized-packet-error?
|
||||||
openpgp-unrecognized-packet-error-port
|
openpgp-unrecognized-packet-error-port
|
||||||
|
openpgp-unrecognized-packet-error-type
|
||||||
openpgp-invalid-signature-error?
|
openpgp-invalid-signature-error?
|
||||||
openpgp-invalid-signature-error-port
|
openpgp-invalid-signature-error-port
|
||||||
|
|
||||||
|
@ -132,6 +133,7 @@ (define-condition-type &openpgp-error &error
|
||||||
;; Error raised when reading an unsupported or unrecognized packet tag.
|
;; Error raised when reading an unsupported or unrecognized packet tag.
|
||||||
(define-condition-type &openpgp-unrecognized-packet-error &openpgp-error
|
(define-condition-type &openpgp-unrecognized-packet-error &openpgp-error
|
||||||
openpgp-unrecognized-packet-error?
|
openpgp-unrecognized-packet-error?
|
||||||
|
(type openpgp-unrecognized-packet-error-type)
|
||||||
(port openpgp-unrecognized-packet-error-port))
|
(port openpgp-unrecognized-packet-error-port))
|
||||||
|
|
||||||
;; Error raised when reading an invalid signature packet.
|
;; Error raised when reading an invalid signature packet.
|
||||||
|
@ -477,7 +479,8 @@ (define (get-data p tag len)
|
||||||
((= tag PACKET-ONE-PASS-SIGNATURE)
|
((= tag PACKET-ONE-PASS-SIGNATURE)
|
||||||
'one-pass-signature) ;TODO: implement
|
'one-pass-signature) ;TODO: implement
|
||||||
(else
|
(else
|
||||||
(raise (condition (&openpgp-unrecognized-packet-error (port p))))))))
|
(raise (condition (&openpgp-unrecognized-packet-error (type tag)
|
||||||
|
(port p))))))))
|
||||||
|
|
||||||
(define-record-type <openpgp-public-key>
|
(define-record-type <openpgp-public-key>
|
||||||
(make-openpgp-public-key version subkey? time value fingerprint)
|
(make-openpgp-public-key version subkey? time value fingerprint)
|
||||||
|
@ -817,6 +820,7 @@ (define (parse tag data)
|
||||||
(if critical?
|
(if critical?
|
||||||
(raise (condition
|
(raise (condition
|
||||||
(&openpgp-unrecognized-packet-error
|
(&openpgp-unrecognized-packet-error
|
||||||
|
(type type)
|
||||||
(port signature-port))))
|
(port signature-port))))
|
||||||
(list 'unsupported-subpacket type data))))))
|
(list 'unsupported-subpacket type data))))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue