don't hardcode /home/fred/... as directory for certificates and metadata. They

are installed and to be found in $pkgdatadir (default is $prefix/share/idpc)
This commit is contained in:
fpeters 2004-07-30 11:41:30 +00:00
parent 4060b6150c
commit 6d0247a2e2
5 changed files with 20 additions and 29 deletions

View File

@ -24,6 +24,7 @@ AC_HEADER_STDC
AC_OUTPUT([
Makefile
data/Makefile
src/Makefile
])

View File

@ -1,4 +1,4 @@
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
all:
pkgdata_DATA = ca-crt.pem idp-crt.pem \
idp-metadata.xml idp-private-key.pem idp-public-key.pem \
sp-crt.pem sp-metadata.xml sp-private-key.pem sp-public-key.pem

View File

@ -1,7 +1,6 @@
cgidir = /usr/lib/cgi-bin
cgi_PROGRAMS = idpc
sbin_PROGRAMS = idpc
INCLUDES = $(IDPC_CFLAGS)
INCLUDES = $(IDPC_CFLAGS) -DPKGDATADIR=\"${datadir}/${PACKAGE}/\"
idpc_SOURCES = idpc.c idpc.h single_sign_on.c soap_end_point.c
idpc_LDADD = $(IDPC_LIBS)

View File

@ -21,10 +21,6 @@
#include "idpc.h"
#define DATADIR "/home/fred/src/idpc/idpc/data/"
/* FIXME; should be defined from ./configure */
int single_sign_on()
{
LassoServer *server_context;
@ -39,17 +35,16 @@ int single_sign_on()
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",
PKGDATADIR "idp-metadata.xml",
PKGDATADIR "idp-public-key.pem",
PKGDATADIR "idp-private-key.pem",
PKGDATADIR "idp-crt.pem",
lassoSignatureMethodRsaSha1);
lasso_server_add_provider(server_context,
DATADIR "sp-metadata.xml",
DATADIR "sp-public-key.pem",
DATADIR "ca-cert.pem");
PKGDATADIR "sp-metadata.xml",
PKGDATADIR "sp-public-key.pem",
PKGDATADIR "ca-cert.pem");
login_context = lasso_login_new(server_context);

View File

@ -21,10 +21,6 @@
#include "idpc.h"
#define DATADIR "/home/fred/src/idpc/idpc/data/"
/* FIXME; should be defined from ./configure */
int soap_end_point()
{
LassoServer* server_context;
@ -36,15 +32,15 @@ int soap_end_point()
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",
PKGDATADIR "idp-metadata.xml",
PKGDATADIR "idp-public-key.pem",
PKGDATADIR "idp-private-key.pem",
PKGDATADIR "idp-crt.pem",
lassoSignatureMethodRsaSha1);
lasso_server_add_provider(server_context,
DATADIR "sp-metadata.xml",
DATADIR "sp-public-key.pem",
DATADIR "ca-cert.pem");
PKGDATADIR "sp-metadata.xml",
PKGDATADIR "sp-public-key.pem",
PKGDATADIR "ca-cert.pem");
clen = atoi(getenv("CONTENT_LENGTH"));