[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: EBCDIC



> -----Original Message-----
> From: jean-frederic clere [mailto:jfrederic.clere@fujitsu-siemens.com]

> Howard Chu wrote:
> > I ported OpenLDAP, OpenSSL, Berkeley DB 4.1, and part of
> Cyrus SASL to
> > OS/390. Aside from Cyrus, all of these packages were fully
> functional but
> > OpenLDAP and OpenSSL operate with ASCII internally. In
> addition to using
> > IBM's libascii, I wrote stdio stubs to handle ASCII/EBCDIC
> translation for
> > parsing commandline args, reading config files, and writing
> log files. These
> > are the only interfaces between the software and the host
> OS that needed
> > work, given the presence of libascii.
>
> I already have OpenSSL, Berkeley DB 4.1 and a lot more
> libraries prepared to use EBCDIC APIs. I do not think I will be able to
have a
> special ASCII version of those for OpenLDAP.

The OpenSSL library is not a special ASCII version. The patches I created for
OpenSSL merely fix the bugs that remained in the original OpenSSL EBCDIC
port. These patches were submitted back to the OpenSSL project, but they
deferred integrating them into the 0.9.6 stream. At some point I expect they
may make it into 0.9.7 or 0.9.8. Note that all of the X.509 string data is
ASCII or Unicode, but the library should convert it properly.

Berkeley DB is not a special ASCII version. The patches I created for
Berkeley DB merely provide fast interprocess mutex locks. Without these
patches you will just have a slow database and single-process locks. These
patches were submitted back to Sleepycat, but they deferred integrating them
into the 4.1 stream. They are in 4.2, which has not been publically released.

> >
> > A lot of what I went thru is in the FAQ-o-Matic now
> > http://www.openldap.org/faq/data/cache/719.html
> >
> > The slapd that I built with this approach interoperates
> correctly with any
> > other LDAP server or client, does not need to do
> character-set translation in
> > the protocol transactions, and thus has no performance
> degradation compared
> > to a native server.
>
> I am not able to locate in the CVS the modifications you
> describe in the
> FAQ-o-Matic. How could I get them?

The changes for OpenLDAP were integrated into the 2.1 release quite a while
ago.
The current release should build properly on OS/390 as-is, given the
constraints I outlined before.

> > If you need to use libldap from other applications, and
> they're passing in
> > EBCDIC strings, you have a lot of hard work ahead of you.
> Since the client
> > library doesn't have ready access to the schema, you don't
> have an easy way
> > of identifying binary values that must be left unmodified,
> vs string values
> > that should be translated.
>
> I am afraid that what I have to do.

Good luck. If you want a general-purpose solution you will need to maintain
full schema on the client. If you know that the majority of your data is
simple strings with only one or two binary special cases, you can adapt that
on the fly...

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support