X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=epg.el;h=6e17c053f1d4b6ab04eb2f56cf9efbac2c6e919f;hb=e79b8c70d2ba7ddeb2cac2cbf147ccfca2ab5e64;hp=62499096127c5db74d75164cd9a525318d1a6188;hpb=581abceda181f9e6cb845edbc1005b19eb45715c;p=elisp%2Fepg.git 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))))