From e79b8c70d2ba7ddeb2cac2cbf147ccfca2ab5e64 Mon Sep 17 00:00:00 2001 From: ueno Date: Mon, 1 May 2006 03:54:07 +0000 Subject: [PATCH] * epg.el (epg-make-signature): Added slots for signature class and version. --- ChangeLog | 1 + epg.el | 45 ++++++++++++++++++++++++++++++++++----------- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 57a8402..19adc5a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ (epg-make-new-signature): New object epg-new-signature. (epg-status-SIG_CREATED): Set epg-new-signature object. (epg-new-signature-to-string): New function. + (epg-make-signature): Added slots for signature class and version. 2006-04-30 Daiki Ueno diff --git a/epg.el b/epg.el index 6249909..6e17c05 100644 --- a/epg.el +++ b/epg.el @@ -343,7 +343,7 @@ This function is for internal use only." (defun epg-make-signature (status &optional key-id) "Return a signature object." - (cons 'epg-signature (vector status key-id nil nil nil nil nil nil))) + (cons 'epg-signature (vector status key-id nil nil nil nil nil nil nil nil))) (defun epg-signature-status (signature) "Return the status code of SIGNATURE." @@ -393,6 +393,18 @@ This function is for internal use only." (signal 'wrong-type-argument (list 'epg-signature-p signature))) (aref (cdr signature) 7)) +(defun epg-signature-class (signature) + "Return the class of SIGNATURE." + (unless (eq (car signature) 'epg-signature) + (signal 'wrong-type-argument (list 'epg-signature-p signature))) + (aref (cdr signature) 8)) + +(defun epg-signature-version (signature) + "Return the version of SIGNATURE." + (unless (eq (car signature) 'epg-signature) + (signal 'wrong-type-argument (list 'epg-signature-p signature))) + (aref (cdr signature) 9)) + (defun epg-signature-set-status (signature status) "Set the status code of SIGNATURE." (unless (eq (car signature) 'epg-signature) @@ -441,6 +453,18 @@ This function is for internal use only." (signal 'wrong-type-argument (list 'epg-signature-p signature))) (aset (cdr signature) 7 digest-algorithm)) +(defun epg-signature-set-class (signature class) + "Set the class of SIGNATURE." + (unless (eq (car signature) 'epg-signature) + (signal 'wrong-type-argument (list 'epg-signature-p signature))) + (aset (cdr signature) 8 class)) + +(defun epg-signature-set-version (signature version) + "Set the version of SIGNATURE." + (unless (eq (car signature) 'epg-signature) + (signal 'wrong-type-argument (list 'epg-signature-p signature))) + (aset (cdr signature) 9 version)) + (defun epg-make-new-signature (type pubkey-algorithm digest-algorithm class creation-time fingerprint) "Return a new signature object." @@ -948,9 +972,9 @@ This function is for internal use only." (epg-signature-set-digest-algorithm (car signatures) (string-to-number (match-string 3 string))) -; (epg-signature-set-class -; (car signatures) -; (string-to-number (match-string 4 string) 16)) + (epg-signature-set-class + (car signatures) + (string-to-number (match-string 4 string) 16)) (epg-signature-set-creation-time (car signatures) (match-string 5 string))))) @@ -972,19 +996,18 @@ This function is for internal use only." (epg-signature-set-expiration-time signature (match-string 3 string)) -; (epg-signature-set-version -; signature -; (string-to-number (match-string 4 string))) + (epg-signature-set-version + signature + (string-to-number (match-string 4 string))) (epg-signature-set-pubkey-algorithm signature (string-to-number (match-string 5 string))) (epg-signature-set-digest-algorithm signature (string-to-number (match-string 6 string))) -; (epg-signature-set-class -; signature -; (string-to-number (match-string 7 string) 16)) - ))) + (epg-signature-set-class + signature + (string-to-number (match-string 7 string) 16))))) (defun epg-status-TRUST_UNDEFINED (process string) (let ((signature (car (epg-context-result-for epg-context 'verify)))) -- 1.7.10.4