initial import
This commit is contained in:
commit
ae9e37b137
|
@ -0,0 +1,18 @@
|
|||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
stamp-h
|
||||
stamp-h1
|
||||
stamp-h.in
|
||||
Makefile.in
|
||||
configure
|
||||
config.h
|
||||
config.h.in
|
||||
config.log
|
||||
config.guess
|
||||
config.status
|
||||
config.sub
|
||||
install-sh
|
||||
missing
|
||||
mkinstalldirs
|
|
@ -0,0 +1,340 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
|
@ -0,0 +1,4 @@
|
|||
2004-07-29 Frederic Peters <fpeters@entrouvert.com>
|
||||
|
||||
* idpc: initial version.
|
||||
|
|
@ -0,0 +1,182 @@
|
|||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, a file
|
||||
`config.cache' that saves the results of its tests to speed up
|
||||
reconfiguring, and a file `config.log' containing compiler output
|
||||
(useful mainly for debugging `configure').
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
|
||||
The file `configure.in' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.in' if you want to change
|
||||
it or regenerate `configure' using a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes awhile. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. You can give `configure'
|
||||
initial values for variables by setting them in the environment. Using
|
||||
a Bourne-compatible shell, you can do that on the command line like
|
||||
this:
|
||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||
|
||||
Or on systems that have the `env' program, you can do it like this:
|
||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not supports the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a time
|
||||
in the source code directory. After you have installed the package for
|
||||
one architecture, use `make distclean' before reconfiguring for another
|
||||
architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=PATH' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' can not figure out
|
||||
automatically, but needs to determine by the type of host the package
|
||||
will run on. Usually `configure' can figure that out, but if it prints
|
||||
a message saying it can not guess the host type, give it the
|
||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name with three fields:
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the host type.
|
||||
|
||||
If you are building compiler tools for cross-compiling, you can also
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for and the `--build=TYPE' option to select the type of
|
||||
system on which you are compiling the package.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Operation Controls
|
||||
==================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Use and save the results of the tests in FILE instead of
|
||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||
debugging `configure'.
|
||||
|
||||
`--help'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--version'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options.
|
|
@ -0,0 +1,2 @@
|
|||
SUBDIRS = src data
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
idpc - IDP as a C CGI program
|
||||
=============================
|
||||
|
||||
Copyright (C) 2004 Entr'ouvert
|
||||
|
||||
|
||||
idpc is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
|
||||
Comments are welcome.
|
||||
|
||||
- Frederic Peters <fpeters@entrouvert.com>
|
|
@ -0,0 +1,66 @@
|
|||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
THEDIR=`pwd`
|
||||
cd $srcdir
|
||||
DIE=0
|
||||
|
||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have autoconf installed to compile idpc."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
(libtoolize --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have libtool installed to compile idpc."
|
||||
echo "Get ftp://alpha.gnu.org/gnu/libtool-1.0h.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
(automake --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have automake installed to compile idpc."
|
||||
echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test -f src/idpc.c || {
|
||||
echo "You must run this script in the top-level idpc directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if test -z "$*"; then
|
||||
echo "I am going to run ./configure with no arguments - if you wish "
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
|
||||
echo "Running libtoolize..."
|
||||
libtoolize --copy --force
|
||||
echo "Running aclocal..."
|
||||
aclocal $ACLOCAL_FLAGS
|
||||
echo "Running automake..."
|
||||
automake --add-missing
|
||||
echo "Running autoconf..."
|
||||
autoconf
|
||||
echo "Running autoheader..."
|
||||
autoheader
|
||||
|
||||
conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
|
||||
|
||||
echo Running configure $conf_flags "$@" ...
|
||||
$srcdir/configure $conf_flags "$@"
|
||||
|
||||
echo
|
||||
echo "Now type 'make' to compile idpc."
|
|
@ -0,0 +1,29 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT(src/idpc.h)
|
||||
AM_INIT_AUTOMAKE(idpc, 0.1.0)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AC_SUBST(VERSION)
|
||||
|
||||
ISODATE=`date +%Y-%m-%d`
|
||||
AC_SUBST(ISODATE)
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_CC
|
||||
|
||||
dnl Checks for libraries.
|
||||
PKG_CHECK_MODULES(IDPC, glib-2.0 neon lasso)
|
||||
AC_SUBST(IDPC_CFLAGS)
|
||||
AC_SUBST(IDPC_LIBS)
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
src/Makefile
|
||||
])
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
Makefile
|
||||
Makefile.in
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
EXTRA_DIST = ca-crt.pem idp-crt.pem idp-metadata.xml idp-private-key.pem idp-public-key.pem Makefile.am sp-crt.pem sp-metadata.xml sp-private-key.pem sp-public-key.pem
|
||||
|
|
@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pYW5jZSBSb290IENBggEAMAwGA1Ud
|
||||
EwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADggEBAB6SMKJeA9j7+HooTlxYWenIU4zq
|
||||
MzIPvlajPVVyvgNgcGLNA/jvNDqvUMIjKOegwrKX4/QzNlZoKSvUK6hD9DGMXmwH
|
||||
p/+AaTMk+KtHy2mNTeIcY2dcislB23BfJUweQD+DIQtu//sHqptVfXPKix/1Hmzz
|
||||
ktrQn+Hz/hyUZdTM+giLN7d5PbO3jOAuVu7pntnikt7paZHUTHbumIKeAh92ZVqa
|
||||
WBc7oQ3P8wz54YdBUaq532oQNII+c19jih9s/BoGI1PbCDmVSDo/i9dLQiUrGdez
|
||||
cYfbLBtpRdefzSFfAv7zp4x3QtqLl+RBpMwv9/PSIVaCDNM7ExedgAYbPfo=
|
||||
-----END CERTIFICATE-----
|
|
@ -0,0 +1,68 @@
|
|||
Certificate:
|
||||
Data:
|
||||
Version: 1 (0x0)
|
||||
Serial Number: 1 (0x1)
|
||||
Signature Algorithm: md5WithRSAEncryption
|
||||
Issuer: C=IT, L=Pompei, O=Vesuvio, CN=Vesuvio Liberty Alliance Root CA
|
||||
Validity
|
||||
Not Before: Apr 20 14:03:45 2004 GMT
|
||||
Not After : Apr 20 14:03:45 2005 GMT
|
||||
Subject: C=IT, L=Pompei, O=Identity Provider Inc, CN=identity-provider
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: rsaEncryption
|
||||
RSA Public Key: (2048 bit)
|
||||
Modulus (2048 bit):
|
||||
00:e1:21:87:dc:53:e7:86:94:3c:ac:21:03:46:60:
|
||||
be:34:49:09:43:a6:6b:1b:58:d1:2f:59:0d:c7:7c:
|
||||
0d:bb:5c:51:66:01:4f:88:40:c5:9e:ef:69:fe:6b:
|
||||
95:42:44:40:cc:ae:2d:c6:00:b9:8b:4c:a6:c2:04:
|
||||
59:b9:a9:f6:c8:5a:dd:ab:b2:a9:73:da:f4:70:cd:
|
||||
52:fe:ae:b7:69:07:8e:31:74:2c:cf:3e:86:d0:d2:
|
||||
18:f4:33:b3:76:b7:65:4d:cd:ae:4e:80:69:20:f0:
|
||||
38:6b:f4:df:35:6a:4c:15:9e:f3:18:1f:53:84:9e:
|
||||
3e:4b:93:00:20:0e:b2:dd:24:56:60:73:aa:76:5c:
|
||||
23:a3:f4:74:3f:80:b7:cb:cc:08:0a:58:08:d1:94:
|
||||
dd:4b:af:d1:92:be:7d:5c:2e:16:46:87:0c:cc:60:
|
||||
92:b2:4f:b5:17:5b:40:66:84:7b:ee:e9:a6:2d:c6:
|
||||
38:9c:59:1b:b5:ac:32:79:15:c4:52:94:a9:0d:ac:
|
||||
60:54:41:26:bc:7f:bf:2a:ac:79:36:15:73:78:26:
|
||||
64:9b:cb:33:3b:33:1e:6b:e4:13:e1:48:77:17:b1:
|
||||
95:c1:8f:fb:f8:95:76:dd:e0:86:ca:bd:a7:dc:48:
|
||||
57:80:2a:b0:d2:79:c6:48:64:7b:be:b3:65:51:ed:
|
||||
68:b3
|
||||
Exponent: 65537 (0x10001)
|
||||
Signature Algorithm: md5WithRSAEncryption
|
||||
05:c9:80:bf:57:8f:57:ed:93:4b:a5:82:3c:8f:1d:53:13:d5:
|
||||
f7:27:87:38:ed:c0:8b:6b:1b:25:ae:18:b4:fd:7e:a7:08:e1:
|
||||
1c:05:c9:17:b5:b2:fe:66:12:22:1d:f2:3a:3d:68:b3:1c:c8:
|
||||
d3:08:49:09:39:83:15:3a:c5:f2:58:de:f7:5d:dc:df:21:95:
|
||||
6b:4e:14:11:b1:8b:d0:66:a5:07:f1:c6:59:1f:77:c5:83:f4:
|
||||
72:10:cd:df:ce:51:43:b2:e2:31:7e:0e:fe:34:80:cd:99:21:
|
||||
5b:b7:f6:1d:14:bd:13:de:c0:7b:8d:84:a4:2a:be:1b:b9:7f:
|
||||
59:7b:07:4e:7d:1c:70:37:83:19:20:4d:f6:4a:80:68:f9:43:
|
||||
a0:36:b3:0c:da:17:10:4d:2b:41:2b:4f:6f:cc:98:96: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+QT4Uh3F7GVwY/7+JV23eCGyr2n3EhXgCqw0nnGSGR7vrNl
|
||||
Ue1oswIDAQABMA0GCSqGSIb3DQEBBAUAA4IBAQAFyYC/V49X7ZNLpYI8jx1TE9X3
|
||||
J4c47cCLaxslrhi0/X6nCOEcBckXtbL+ZhIiHfI6PWizHMjTCEkJOYMVOsXyWN73
|
||||
XdzfIZVrThQRsYvQZqUH8cZZH3fFg/RyEM3fzlFDsuIxfg7+NIDNmSFbt/YdFL0T
|
||||
3sB7jYSkKr4buX9ZewdOfRxwN4MZIE32SoBo+UOgNrMM2hcQTStBK09vzJiWQE/4
|
||||
aWbZJT9jtBPGWTsMS8g1x9WAmJHV2BpUiSfY39895a5T7kbbqZ3rp7DM9dgLjdXC
|
||||
jFL7NhzvY02aBTLhm22YOLYnlycKm64NGne+siooDCi5tel2/vcx+e+btX9x
|
||||
-----END CERTIFICATE-----
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0"?>
|
||||
<EntityDescriptor
|
||||
ProviderID="https://identity-provider:1998/liberty-alliance/metadata"
|
||||
xmlns="urn:liberty:metadata:2003-08">
|
||||
<IDPDescriptor>
|
||||
<SingleLogoutServiceURL>https://localhost/cgi-bin/idpc/singleLogout</SingleLogoutServiceURL>
|
||||
<RegisterNameIdentifierProtocolProfile>http://projectliberty.org/profiles/rni-sp-http</RegisterNameIdentifierProtocolProfile>
|
||||
<SoapEndpoint>https://localhost/cgi-bin/idpc/soapEndpoint</SoapEndpoint>
|
||||
<SingleSignOnServiceURL>https://localhost/cgi-bin/idpc/singleSignOn</SingleSignOnServiceURL>
|
||||
<SingleSignOnProtocolProfile>http://projectliberty.org/profiles/sso-get</SingleSignOnProtocolProfile>
|
||||
<SingleLogoutProtocolProfile>http://projectliberty.org/profiles/slo-idp-soap</SingleLogoutProtocolProfile>
|
||||
<RegisterNameIdentifierServiceURL>https://localhost/cgi-bin/idpc/registerNameIdentifier</RegisterNameIdentifierServiceURL>
|
||||
</IDPDescriptor>
|
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I0ZTdS6/Rkr59XC4W
|
||||
RocMzGCSsk+1F1tAZoR77ummLcY4nFkbtawyeRXEUpSpDaxgVEEmvH+/Kqx5NhVz
|
||||
eCZkm8szOzMea+QT4Uh3F7GVwY/7+JV23eCGyr2n3EhXgCqw0nnGSGR7vrNlUe1o
|
||||
swIDAQAB
|
||||
-----END PUBLIC KEY-----
|
|
@ -0,0 +1,68 @@
|
|||
Certificate:
|
||||
Data:
|
||||
Version: 1 (0x0)
|
||||
Serial Number: 2 (0x2)
|
||||
Signature Algorithm: md5WithRSAEncryption
|
||||
Issuer: C=IT, L=Pompei, O=Vesuvio, CN=Vesuvio Liberty Alliance Root CA
|
||||
Validity
|
||||
Not Before: Apr 20 14:20:31 2004 GMT
|
||||
Not After : Apr 20 14:20:31 2005 GMT
|
||||
Subject: C=IT, L=Pompei, O=Service Provider Inc, CN=service-provider
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: rsaEncryption
|
||||
RSA Public Key: (2048 bit)
|
||||
Modulus (2048 bit):
|
||||
00:b2:23:38:8a:e8:49:5c:14:68:c3:b2:16:51:8b:
|
||||
a7:aa:02:0e:42:35:e2:cb:19:45:e7:3f:97:66:7e:
|
||||
a7:cf:64:c1:51:7e:be:4c:a1:13:b2:c7:91:a2:20:
|
||||
13:54:67:98:f8:5c:b9:dc:cc:08:d1:5c:ea:89:29:
|
||||
1d:db:55:c9:4f:86:4d:25:e1:44:de:ff:04:66:01:
|
||||
a0:3a:5f:36:94:cc:3f:46:94:a7:0f:c1:40:e8:4b:
|
||||
fb:37:9b:d2:74:ac:49:fe:de:8c:d7:8a:ca:f4:7e:
|
||||
ab:98:9a:fb:73:78:76:6f:6f:81:43:d6:66:4d:22:
|
||||
37:45:11:31:24:71:cc:80:37:9c:4b:11:f8:1f:49:
|
||||
57:b0:45:17:27:db:07:1c:0b:47:80:21:b7:ae:bb:
|
||||
72:e4:9e:16:70:14:9f:29:e9:26:21:e2:28:5f:eb:
|
||||
e7:25:e4:f8:42:8a:fb:ef:0d:a6:37:e5:a4:99:c5:
|
||||
55:3d:66:49:f8:fe:ea:26:2e:b6:23:ab:81:42:a0:
|
||||
08:03:6c:69:7a:f4:5a:89:91:e2:82:a0:92:ac:cf:
|
||||
d8:32:c3:c2:7c:22:ef:7b:d4:01:6e:32:f4:20:4d:
|
||||
93:b9:c3:b5:92:45:85:4c:4a:6b:ad:e2:d4:78:07:
|
||||
08:a3:6f:1d:f5:63:bc:a3:f3:f3:8e:0f:9c:bc:3f:
|
||||
09:63
|
||||
Exponent: 65537 (0x10001)
|
||||
Signature Algorithm: md5WithRSAEncryption
|
||||
39:f0:15:7b:14:18:d8:89:a0:05:68:dc:02:41:80:61:f2:f0:
|
||||
31:9d:a4:f2:3b:50:19:18:1b:3e:e0:f5:0c:14:3e:a1:99:be:
|
||||
62:4b:b0:df:4a:2b:54:0a:3c:fd:2e:4f:71:23:5d:45:ac:0e:
|
||||
56:84:d8:eb:4a:11:ba:91:81:72:da:2a:4b:39:a9:4a:20:64:
|
||||
58:ec:1b:e3:00:59:38:77:d2:35:11:43:4b:cd:cd:d1:ec:07:
|
||||
93:81:45:63:ab:79:34:f9:61:50:e4:42:d3:bc:65:e0:66:95:
|
||||
51:be:4b:8f:20:ca:32:1d:a3:46:d2:da:47:ce:65:09:5f:31:
|
||||
56:f3:3e:8d:d0:73:04:cd:85:c4:e4:34:59:d8:69:84:c8:ce:
|
||||
e2:08:f9:7a:77:bb:f7:58:93:e0:fa:40:eb:da:3b:c2:e6:7d:
|
||||
83:bd:bc:08:66:ff:1d:15:31:e4:43:e0:6c:8c:b9:d8:6d:b6:
|
||||
e0:84:e5:41:66:9d:0f:56:7a:cb:83:c5:4e:8c:03:8e:46:91:
|
||||
55:ea:e3:51:54:49:67:f6:b9:41:53:6c:23:80:ee:ff:3e:f5:
|
||||
cc:06:dd:83:83:5f:4d:f5:e3:01:71:d1:84:41:9a:a6:91:d5:
|
||||
05:13:80:40:57:21:43:4a:0a:84:24:e4:20:23:78:4d:44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O4gj5ene791iT4PpA69o7wuZ9g728
|
||||
CGb/HRUx5EPgbIy52G224ITlQWadD1Z6y4PFTowDjkaRVerjUVRJZ/a5QVNsI4Du
|
||||
/z71zAbdg4NfTfXjAXHRhEGappHVBROAQFchQ0oKhCTkICN4TUSuodgy/A==
|
||||
-----END CERTIFICATE-----
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0"?>
|
||||
<EntityDescriptor
|
||||
ProviderID="https://service-provider:2003/liberty-alliance/metadata"
|
||||
xmlns="urn:liberty:metadata:2003-08">
|
||||
<SPDescriptor>
|
||||
<SingleLogoutServiceURL>https://service-provider:2003/liberty-alliance/liberty-alliance/singleLogout</SingleLogoutServiceURL>
|
||||
<RegisterNameIdentifierProtocolProfile>http://projectliberty.org/profiles/rni-sp-soap</RegisterNameIdentifierProtocolProfile>
|
||||
<SoapEndpoint>https://service-provider:2003/liberty-alliance/liberty-alliance/soapEndpoint</SoapEndpoint>
|
||||
<SingleLogoutProtocolProfile>http://projectliberty.org/profiles/slo-idp-soap</SingleLogoutProtocolProfile>
|
||||
<RegisterNameIdentifierServiceURL>https://service-provider:2003/liberty-alliance/liberty-alliance/registerNameIdentifier</RegisterNameIdentifierServiceURL>
|
||||
<AssertionConsumerServiceURL id="AssertionConsumerServiceURL1" isDefault="true">https://service-provider:2003/liberty-alliance/liberty-alliance/assertionConsumer</AssertionConsumerServiceURL>
|
||||
<AuthnRequestsSigned>true</AuthnRequestsSigned>
|
||||
</SPDescriptor>
|
||||
</EntityDescriptor>
|
|
@ -0,0 +1,27 @@
|
|||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEogIBAAKCAQEAsiM4iuhJXBRow7IWUYunqgIOQjXiyxlF5z+XZn6nz2TBUX6+
|
||||
TKETsseRoiATVGeY+Fy53MwI0VzqiSkd21XJT4ZNJeFE3v8EZgGgOl82lMw/RpSn
|
||||
D8FA6Ev7N5vSdKxJ/t6M14rK9H6rmJr7c3h2b2+BQ9ZmTSI3RRExJHHM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pc
|
|
@ -0,0 +1,8 @@
|
|||
cgidir = /usr/lib/cgi-bin
|
||||
cgi_PROGRAMS = idpc
|
||||
|
||||
INCLUDES = $(IDPC_CFLAGS)
|
||||
idpc_SOURCES = idpc.c idpc.h single_sign_on.c soap_end_point.c
|
||||
idpc_LDADD = $(IDPC_LIBS)
|
||||
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
* idpc - IDP as a C CGI program
|
||||
* Copyright (C) 2004 Entr'ouvert
|
||||
*
|
||||
* Author: Frederic Peters <fpeters@entrouvert.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "idpc.h"
|
||||
|
||||
extern int single_sign_on();
|
||||
extern int soap_end_point();
|
||||
static int credits();
|
||||
|
||||
struct page {
|
||||
char *name;
|
||||
int (*page_function) ();
|
||||
};
|
||||
|
||||
struct page pages[] = {
|
||||
{"", credits},
|
||||
{"credits", credits},
|
||||
{"singleSignOn", single_sign_on},
|
||||
{"soapEndpoint", soap_end_point},
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
static int credits()
|
||||
{
|
||||
printf("Content-type: text/plain\n\n");
|
||||
printf(" * idpc - IDP as a C CGI program\n");
|
||||
printf(" * Copyright (C) 2004 Entr'ouvert\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int four_zero_four()
|
||||
{
|
||||
printf("Status: 404 Not Found\n");
|
||||
printf("Content-type: text/plain\n\n");
|
||||
printf("Page not found");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int error_page(char* msg)
|
||||
{
|
||||
printf("Status: 500 Server Error\n");
|
||||
printf("Content-type: text/plain\n\n");
|
||||
printf("Error; %s\n", msg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char *path_info, *uri = NULL;
|
||||
lasso_init();
|
||||
int i = 0, rc = 0;
|
||||
|
||||
path_info = getenv("PATH_INFO");
|
||||
if (path_info) {
|
||||
uri = strdup(path_info+1); /* +1 to ignore first slash */
|
||||
if (strlen(uri) && uri[strlen(uri)-1] == '/') {
|
||||
/* remove trailing slash */
|
||||
uri[strlen(uri)-1] = 0;
|
||||
}
|
||||
} else {
|
||||
uri = strdup("");
|
||||
}
|
||||
|
||||
while (pages[i].name) {
|
||||
if (strcmp(uri, pages[i].name) == 0) {
|
||||
g_free(uri);
|
||||
rc = pages[i].page_function();
|
||||
goto shutdown;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
rc = four_zero_four();
|
||||
|
||||
shutdown:
|
||||
lasso_shutdown();
|
||||
return rc;
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* idpc - IDP as a C CGI program
|
||||
* Copyright (C) 2004 Entr'ouvert
|
||||
*
|
||||
* Author: Frederic Peters <fpeters@entrouvert.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <lasso/lasso.h>
|
||||
|
||||
int error_page(char* msg);
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
/*
|
||||
* idpc - IDP as a C CGI program
|
||||
* Copyright (C) 2004 Entr'ouvert
|
||||
*
|
||||
* Author: Frederic Peters <fpeters@entrouvert.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "idpc.h"
|
||||
|
||||
#define DATADIR "/home/fred/src/idpc/idpc/data/"
|
||||
/* FIXME; should be defined from ./configure */
|
||||
|
||||
|
||||
int single_sign_on()
|
||||
{
|
||||
LassoServer *server_context;
|
||||
LassoLogin *login_context;
|
||||
lassoHttpMethods response_method;
|
||||
char *http_verb;
|
||||
char *authn_request_msg;
|
||||
int rc;
|
||||
char *name_identifier, *assertion_artifact, *response_dump;
|
||||
FILE *f;
|
||||
|
||||
|
||||
http_verb = getenv("REQUEST_METHOD");
|
||||
|
||||
|
||||
server_context = lasso_server_new(
|
||||
DATADIR "idp-metadata.xml",
|
||||
DATADIR "idp-public-key.pem",
|
||||
DATADIR "idp-private-key.pem",
|
||||
DATADIR "idp-crt.pem",
|
||||
lassoSignatureMethodRsaSha1);
|
||||
lasso_server_add_provider(server_context,
|
||||
DATADIR "sp-metadata.xml",
|
||||
DATADIR "sp-public-key.pem",
|
||||
DATADIR "ca-cert.pem");
|
||||
|
||||
|
||||
login_context = lasso_login_new(server_context);
|
||||
|
||||
if (strcmp(http_verb, "GET") == 0) {
|
||||
char *t;
|
||||
t = getenv("QUERY_STRING");
|
||||
if (t) {
|
||||
authn_request_msg = strdup(t);
|
||||
} else {
|
||||
authn_request_msg = strdup("");
|
||||
}
|
||||
response_method = lassoHttpMethodRedirect;
|
||||
} else {
|
||||
/* FIXME: handle POST */
|
||||
}
|
||||
|
||||
rc = lasso_login_init_from_authn_request_msg(login_context,
|
||||
authn_request_msg, response_method);
|
||||
if (rc != 0) {
|
||||
char msg[100];
|
||||
sprintf(msg, "Lasso login error, %d", rc);
|
||||
return error_page(msg);
|
||||
}
|
||||
|
||||
rc = lasso_login_must_authenticate(login_context);
|
||||
|
||||
if (login_context->protocolProfile == lassoLoginProtocolProfileBrwsArt) {
|
||||
rc = lasso_login_build_artifact_msg(login_context,
|
||||
1, /* user authenticated */
|
||||
lassoSamlAuthenticationMethodPassword,
|
||||
"", /* reauthenticateOnOrAfter */
|
||||
lassoHttpMethodRedirect);
|
||||
/* TODO: error checking */
|
||||
|
||||
name_identifier = strdup(
|
||||
LASSO_PROFILE_CONTEXT(login_context)->nameIdentifier);
|
||||
f = fopen("/tmp/name_identifier", "w");
|
||||
fputs(name_identifier, f);
|
||||
fclose(f);
|
||||
free(name_identifier);
|
||||
|
||||
assertion_artifact = strdup(login_context->assertionArtifact);
|
||||
f = fopen("/tmp/assertion_artifact", "w");
|
||||
fputs(assertion_artifact, f);
|
||||
fclose(f);
|
||||
free(assertion_artifact);
|
||||
|
||||
response_dump = strdup(login_context->response_dump);
|
||||
/*printf("Content-type: text/plain\n\n");
|
||||
printf("Response dump: %s", login_context->response_dump);*/
|
||||
f = fopen("/tmp/response_dump", "w");
|
||||
fputs(response_dump, f);
|
||||
fclose(f);
|
||||
free(response_dump);
|
||||
|
||||
printf("Location: %s\n\nRedirected",
|
||||
LASSO_PROFILE_CONTEXT(login_context)->msg_url);
|
||||
|
||||
}
|
||||
if (login_context->protocolProfile == lassoLoginProtocolProfileBrwsPost) {
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
printf("Content-type: text/plain\n\nsingle sign on; to be continued...");
|
||||
|
||||
/*auth_method = lassoSamlAuthenticationMethodPassword; */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* idpc - IDP as a C CGI program
|
||||
* Copyright (C) 2004 Entr'ouvert
|
||||
*
|
||||
* Author: Frederic Peters <fpeters@entrouvert.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "idpc.h"
|
||||
|
||||
#define DATADIR "/home/fred/src/idpc/idpc/data/"
|
||||
/* FIXME; should be defined from ./configure */
|
||||
|
||||
|
||||
int soap_end_point()
|
||||
{
|
||||
LassoServer* server_context;
|
||||
LassoLogin* login_context;
|
||||
int clen = 0;
|
||||
char *soap_msg, *soap_answer;
|
||||
FILE *f;
|
||||
int request_type;
|
||||
int rc;
|
||||
|
||||
server_context = lasso_server_new(
|
||||
DATADIR "idp-metadata.xml",
|
||||
DATADIR "idp-public-key.pem",
|
||||
DATADIR "idp-private-key.pem",
|
||||
DATADIR "idp-crt.pem",
|
||||
lassoSignatureMethodRsaSha1);
|
||||
lasso_server_add_provider(server_context,
|
||||
DATADIR "sp-metadata.xml",
|
||||
DATADIR "sp-public-key.pem",
|
||||
DATADIR "ca-cert.pem");
|
||||
|
||||
clen = atoi(getenv("CONTENT_LENGTH"));
|
||||
|
||||
soap_msg = malloc(clen+1);
|
||||
fgets(soap_msg, clen+1, stdin);
|
||||
request_type = lasso_profile_context_get_request_type_from_soap_msg(soap_msg);
|
||||
if (request_type == lassoRequestTypeLogin) {
|
||||
login_context = lasso_login_new(server_context);
|
||||
rc = lasso_login_process_request_msg(login_context, soap_msg);
|
||||
f = fopen("/tmp/response_dump", "r");
|
||||
fseek(f, 0, SEEK_END);
|
||||
clen = ftell(f);
|
||||
rewind(f);
|
||||
soap_answer = malloc(clen);
|
||||
fread(soap_answer, clen, 1, f);
|
||||
fclose(f);
|
||||
}
|
||||
/* TODO: handle other request_type */
|
||||
free(soap_msg);
|
||||
|
||||
printf("Content-type: text/xml\n\n");
|
||||
fputs(soap_answer, stdout);
|
||||
free(soap_answer);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue