Skip to Content.
Sympa Menu

shibboleth-dev - C++ API (near alpha quality)

Subject: Shibboleth Developers

List archive

C++ API (near alpha quality)


Chronological Thread 
  • From: "Scott Cantor" <>
  • To: "'Shibboleth Design Team'" <>
  • Subject: C++ API (near alpha quality)
  • Date: Mon, 4 Mar 2002 17:35:51 -0500
  • Importance: Normal
  • Organization: The Ohio State University

Sridhar needs this specifically, but I figured I'd just send it to the
list.

I've checked in the latest working code I have. This is pretty close to
complete with respect to the alpha delivery.

http://usfs2.us.ohio-state.edu/webdev/Shibboleth/

This is the VC6 project tree (the java/ stuff remains underneath):

include/
shibrun.h (main header)
eduPerson.h (base class for attribute
handling)
shibrun/
*.cpp (the runtime library classes)
eduPerson/
ScopedAttribute.cpp (handles basic scoped attributes like
EPPN)
shibtest/
shibtest.cpp (test driver)

The test driver is a simple harness that hardcodes a bunch of stuff and
will connect to an AA and parse EPPN and Affiliation as sent by Parviz'
prototype. Attribute acceptance in the ScopedAttribute class is
currently always true.

Notes:
The runtime needs a compiler that supports namespaces, templates, STL,
and exceptions. I have working code on Visual C++ 6 on NT, and will move
to gcc on Solaris now. I'll start with 2.95 and only move to 3.0 if I
have to. Hopefully no major changes needed, but I expect some.

The API makes heavy use of XMLCh* strings, which are Xerces' native
string type. They're UTF-16 encoded data. Most platforms including
Windows use UTF-16 for their wchar_t type. Solaris and some others do
not, therefore I did not use wstrings in the interface. I specialized
basic_string around the XMLCh type instead and created an xstring type.

I realize the RM and other components will want char*'s, but it's much
easier to leave that up to the SHAR and let the API stay native as much
as possible. When you're ready to convert, just do
XMLString::transcode(widebuf)
and Xerces will allocate a local code page version of the string for
you. You have to delete it or wrap in an auto_ptr, of course.

Remember to prefix string constants you pass into the API with the L to
indicate it's a wide literal.

When debug mode is on, libcurl is set for verbose output, and a ton of
stuff gets dumped to cerr/wcerr.

Required supporting libraries:
Xerces 1.7.0 (latest code from CVS as of this morning is needed)
libcurl 7.9.4 (http://curl.haxx.se/)
OpenSSL 0.9.6

Hopefully enough to start...

-- Scott

------------------------------------------------------mace-shib-design-+
For list utilities, archives, subscribe, unsubscribe, etc. please visit the
ListProc web interface at

http://archives.internet2.edu/

------------------------------------------------------mace-shib-design--



  • C++ API (near alpha quality), Scott Cantor, 03/04/2002

Archive powered by MHonArc 2.6.16.

Top of Page