Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <jas@extundo.com>
Cc: ding@gnus.org
Subject: Re: ldap cert retrieval and pem encoding
Date: Tue, 24 May 2005 16:18:31 +0200	[thread overview]
Message-ID: <iluoeb0u2q0.fsf@latte.josefsson.org> (raw)
In-Reply-To: <zf.upn64x9uekt.fsf@zeitform.de> (Ulf Stegemann's message of "Tue, 24 May 2005 12:02:26 +0200")

Ulf Stegemann <ulf@zeitform.de> writes:

> XEmacs 21.4 (patch 17) "Jumbo Shrimp" [Lucid] (i686-pc-linux, Mule), 
> No Gnus v0.4
>
> The ldap server I use stores s/mime certificates either in DER or in PEM
> format.  smime-ldap retrieves only DER encoded certificates correctly.  PEM
> encoded certificates are fetched, too, but the resulting tmp file/buffer does
> not contain the correct cert only something that looks like a cert.
>
> Can anyone confirm this behaviour or is it a local problem?

The code assume the data returned is in DER form, so I think your
analysis is correct, and it is not a local problem.  The received,
assumed-DER, data is then base64 encoded, and wrapped into a PEM blob.
You should be able to base64 decode the tmp file/buffer content, and
get the certificate in PEM format.

I see two solutions:

The Right Thing: figure out how to get the type of data returned from
the server, and follow that hint.

The Workaround: Look at the received data to see if the head happen to
match a PEM header, and decide based on that.

It might be that the two solutions collapse into one if the server
can't return the type of data in any other way of having a PEM header
on the blob, though.



  reply	other threads:[~2005-05-24 14:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-24 10:02 Ulf Stegemann
2005-05-24 14:18 ` Simon Josefsson [this message]
2005-05-26 22:31 ` Arne Jørgensen
2005-05-27 15:58   ` Ulf Stegemann
2005-05-28 11:30     ` Arne Jørgensen
2005-05-28 11:53       ` Simon Josefsson
2005-05-30  8:39         ` Ulf Stegemann
2005-05-30  8:48           ` Arne Jørgensen
2005-05-31  9:33       ` Arne Jørgensen
2005-05-31 11:21         ` Ulf Stegemann
2005-05-31 11:29           ` Simon Josefsson
2005-05-31 11:48             ` Reiner Steib
2005-05-31 12:59               ` Arne Jørgensen
2005-05-31 12:01             ` Ulf Stegemann
2005-05-31 12:07               ` Simon Josefsson
2005-05-31 12:57           ` Arne Jørgensen
2005-05-31 13:13             ` Simon Josefsson
2005-05-26 22:31 ` Arne Jørgensen

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=iluoeb0u2q0.fsf@latte.josefsson.org \
    --to=jas@extundo.com \
    --cc=ding@gnus.org \
    /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).