anchor.diff:        ((equal '(1 2 840 10040 4 1) pka)
          (setf algorithm :dsa)
          (unless (eql (first (second public-key-algorithm)) :sequence)
  -	 (error 'x509-decoding-error :text "Dss-Params should be an ASN.1 sequence."))
  +         (error 'x509-decoding-error :text "Dss-Params should be an ASN.1 sequence."))
          (let ((dss-params (second (second public-key-algorithm))))
  -	 (unless (and (= (length dss-params) 3)
  -		      (every #'(lambda (li) (eql (first li) :integer)) dss-params))
  -	   (error "Invalid Dss-params"))
  -	 (setf (getf params :dsa-p) (second (first dss-params)))
  -	 (setf (getf params :dsa-q) (second (second dss-params)))
  -	 (setf (getf params :dsa-g) (second (third dss-params)))))
  +         (unless (and (= (length dss-params) 3)
  +                      (every #'(lambda (li) (eql (first li) :integer)) dss-params))
  +           (error "Invalid Dss-params"))
  +         (setf (getf params :dsa-p) (second (first dss-params)))
  +         (setf (getf params :dsa-q) (second (second dss-params)))
  +         (setf (getf params :dsa-g) (second (third dss-params)))))
         ;; DH
         ((equal '(1 2 840 113549 1 3 1) pka)
          (setf algorithm :dh)
          (unless (eql :sequence (first (second public-key-algorithm)))
  -	 (error :text "DH parameters should be a sequence"))
  +         (error :text "DH parameters should be a sequence"))
          (let ((dh-params (second (second public-key-algorithm))))
  -	 (unless (and (< 1 (length dh-params) 4)
  -		      (every #'(lambda (li) (eql (first li) :integer)) dh-params))
  -	   (error 'x509-decoding-error
  -		  :text "Invalid DHParameter field in SubjectPublicKeyInfo"))
  -	 (setf (getf params :dh-P) (second (first dh-params)))
  -	 (setf (getf params :dh-G) (second (second dh-params)))
  -	 (when (= (length dh-params) 3)
  -	   (setf (getf params :dh-privateValueLength) (second (third dh-params))))))
  +         (unless (and (< 1 (length dh-params) 4)
  +                      (every #'(lambda (li) (eql (first li) :integer)) dh-params))
  +           (error 'x509-decoding-error
  +                  :text "Invalid DHParameter field in SubjectPublicKeyInfo"))
  +         (setf (getf params :dh-P) (second (first dh-params)))
  +         (setf (getf params :dh-G) (second (second dh-params)))
  +         (when (= (length dh-params) 3)
  +           (setf (getf params :dh-privateValueLength) (second (third dh-params))))))
         ;; ECDSA
         ((equal '(1 2 840 10045 2 1) pka)
          (setf algorithm :ecdsa)
  
positive.code:     (cond
        ;; RSA 
        ((and (= (length oid) 7)
  	    (equal (butlast oid) '(1 2 840 113549 1 1)))
         (values :rsa
  	       (case (seventh oid)
  		 (2 :md2)
  		 (4 :md5)
  		 (5 :sha1)
  		 (11 :sha256)
  		 (12 :sha384)
  		 (13 :sha512)
  		 (otherwise
  		  (error 'x509-decoding-error :text "Unknown digest algorithm")))))
        ;; DSA with sha1
        ((equal oid '(1 2 840 10040 4 3))
         (values :dsa :sha1))
  
negative.code:        ;; -- specifiedCurve  SpecifiedECDomain
         ;;      }
         (unless (or (eql (first (second public-key-algorithm)) :null)
                     (eql (first (second public-key-algorithm)) :oid))
           (error 'x509-decoding-error
                  :text "ECParameters for id-ecPublicKey should be either NULL or OID"))
         (let ((named-curve (second (second public-key-algorithm))))
           (setf (getf params :named-curve)
                 (cond
                   ((equal named-curve '(1 2 840 10045 3 1 1)) :secp192r1)
                   ((equal named-curve '(1 2 840 10045 3 1 7)) :secp256r1)
                   ((equal named-curve '(1 3 132 0 1)) :sect163k1)
                   ((equal named-curve '(1 3 132 0 15)) :sect163r2)
                   ((equal named-curve '(1 3 132 0 16)) :sect283k1)
                   ((equal named-curve '(1 3 132 0 17)) :sect283r1)
                   ((equal named-curve '(1 3 132 0 26)) :sect233k1)
                   ((equal named-curve '(1 3 132 0 27)) :sect233r1)
                   ((equal named-curve '(1 3 132 0 33)) :secp224r1)
                   ((equal named-curve '(1 3 132 0 34)) :secp384r1)
                   ((equal named-curve '(1 3 132 0 35)) :secp521r1)
                   ((equal named-curve '(1 3 132 0 36)) :sect409k1)
                   ((equal named-curve '(1 3 132 0 37)) :sect409r1)
                   ((equal named-curve '(1 3 132 0 38)) :sect571k1)
                   ((equal named-curve '(1 3 132 0 39)) :sect571r1)
                   (t
                    (error 'x509-decoding-error
                           :text "Unknown or unsupported EC named curve"))))))
        ((equal '(1 3 132 1 12) pka)
         (setf algorithm :ecdh))
        (t
         (error 'x509-decoding-error
                :text "Unrecognized or unsupported public key algorithm")))
      (cons algorithm params)))
  
  (defun parse-pub-key (ov algorithm)
  