From: "Arne Jørgensen" <arne@arnested.dk>
Subject: Re: smime-cert-by-ldap-1 problem
Date: Tue, 14 Jun 2005 22:46:06 +0200 [thread overview]
Message-ID: <877jgwfz01.fsf@seamus.arnested.dk> (raw)
In-Reply-To: <mj7slzkrdzr.fsf@mm117419-pc.MITRE.ORG>
david.goldberg6@verizon.net (David S. Goldberg) writes:
> According to this bit from smime.el:
>
> ;; Certificates on LDAP servers _should_ be in DER format,
> ;; but there are some servers out there that distributes the
> ;; certificates in PEM format (with or without
> ;; header/footer) so we try to handle them anyway.
> (if (or (string= (substring (cadaar ldapresult) 0 27)
> "-----BEGIN CERTIFICATE-----")
> (condition-case nil
> (base64-decode-string (cadaar ldapresult))
> (error nil)))
> (setq cert
> (smime-replace-in-string
> (cadaar ldapresult)
> (concat "\\(\n\\|\r\\|-----BEGIN CERTIFICATE-----\\|"
> "-----END CERTIFICATE-----\\)")
> "" t))
> (setq cert (base64-encode-string (cadaar ldapresult) t)))
>
> then the result of smime-cert-by-ldap should be a base64 encoded block
> surrounded by the BEGIN and END CERTIFICATE lines.
Correct.
> Instead, I get the DER with extra CRs inserted every 64 bytes,
> surrounded by the BEGIN and END lines. The problem is that
> base64-decode-string does not throw an error, and from what I can
> see in base64.el, it's not designed to.
Is base64-decode-string on XEmacs different from the one in Emacs?
As I remember base64-decode-string does throw an error on Emacs. I
will look deeper in to this tomorrow or the day after.
> Interesting enough, the DER with the extra CRs seems to work OK though
That's weird I think.
> I have to wonder if it's related to the CRs that in the magic number
> issue I wrote about earlier.
I don't think so.
Kind regards,
--
Arne Jørgensen <http://arnested.dk/>
next prev parent reply other threads:[~2005-06-14 20:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-14 18:26 David S. Goldberg
2005-06-14 20:46 ` Arne Jørgensen [this message]
2005-06-16 9:05 ` Arne Jørgensen
2005-06-16 12:40 ` Simon Josefsson
2005-06-16 12:51 ` Arne Jørgensen
2005-06-16 13:52 ` David S. Goldberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877jgwfz01.fsf@seamus.arnested.dk \
--to=arne@arnested.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).