Mark Smith wrote: > Nelson Bolyard wrote: >> Hi LDAP gurus, >> >> There are numerous small stand-alone programs that take an http URL as a >> command line argument and fetch the requested URL and store it to a local >> file (or write it to stdout). Examples include wget and graburl. >> >> Is there a similar program for ldap? >> ... > > Try curl.
Thanks, Mark! I downloaded curl from http://curl.haxx.se/ (that name didn't give me a lot of confidence :-/ ) There was a readme, but no comprehensive documentation on the command line syntax (that I could find). I couldn't find any clues in the numerous text files that came with it that it supported ldap URLs. But emboldened by your recommendation, I tried the command curl $THAT_URL > /tmp/identrust.crt and got an interesting result. It was a text file containing two lines of text. The first line looked a lot like the original URL DN: cn=DST ACES CA X6,ou=DST ACES,o=Digital Signature Trust,c=US The second line was a very long line which began: cACertificate;binary: MIIEC[...] The rest of the line contained a base64-encoding of the cert, all in one single line. The program also wrote to stderr this: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 I thought it a little odd that the output said "cACertificate;binary:" when the output was not binary but rather base64 encoded, but maybe that's an LDAP thing? "binary" means "base64" ?? I expunged all the but long base64 stuff, then used fold to fold it into 72-character lines, then added back the original header line, and lines that said: -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- and the result worked quite nicely. Many thanks. /Nelson _______________________________________________ dev-tech-ldap mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-ldap
