Sync
authorAndrew McNab <andrew.mcnab@manchester.ac.uk>
Thu, 15 Nov 2007 13:06:09 +0000 (13:06 +0000)
committerAndrew McNab <andrew.mcnab@manchester.ac.uk>
Thu, 15 Nov 2007 13:06:09 +0000 (13:06 +0000)
org.gridsite.core/CHANGES
org.gridsite.core/VERSION
org.gridsite.core/interface/gridsite.h
org.gridsite.core/src/Makefile
org.gridsite.core/src/grst_asn1.c
org.gridsite.core/src/grst_x509.c
org.gridsite.core/src/make-gridsite-spec

index 4234759..caa5e2f 100644 (file)
@@ -1,3 +1,8 @@
+* Thu Nov 15 2007 Andrew McNab <Andrew.McNab@cern.ch>
+- Add libgridsite_nossl.[so|a] with no dependencies 
+  on OpenSSL (for gLite L&B.)
+* Thu Nov 15 2007 Andrew McNab <Andrew.McNab@cern.ch>
+- ==== GridSite version 1.5.7 ====
 * Fri Nov 9 2007 Andrew McNab <Andrew.McNab@man.ac.uk>
 - Many changes, including switch to AURI internal
   format for credentials
index 776df0e..908728e 100644 (file)
@@ -1,5 +1,5 @@
 MAJOR_VERSION=1
 MINOR_VERSION=1.5
-PATCH_VERSION=1.5.6
-DEFVERSION=010506
+PATCH_VERSION=1.5.7
+DEFVERSION=010507
 VERSION=$(PATCH_VERSION)
index 0581ef8..2a26c35 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2002-6, Andrew McNab, University of Manchester
+   Copyright (c) 2002-7, Andrew McNab, University of Manchester
    All rights reserved.
 
    Redistribution and use in source and binary forms, with or
@@ -37,6 +37,8 @@
 #define GRST_VERSION 010500
 #endif
 
+#ifndef GRST_NO_OPENSSL
+
 #ifndef HEADER_SSL_H
 #include <openssl/ssl.h>
 #endif
 #include <openssl/crypto.h>
 #endif
 
+#endif
+
+#ifndef _TIME_H
+#include <time.h>
+#endif
+
+#ifndef _STDIO_H
+#include <stdio.h>
+#endif
+
 #ifndef FALSE
 #define FALSE (0)
 #endif
@@ -178,8 +190,10 @@ typedef struct { int    type;              /* CA, user, proxy, VOMS, ... */
 /* a chain of certs, starting from the first CA */
 typedef struct { GRSTx509Cert *firstcert; } GRSTx509Chain;
 
+#ifndef GRST_NO_OPENSSL
 int GRSTx509CertLoad(GRSTx509Cert *, X509 *);
 int GRSTx509ChainLoadCheck(GRSTx509Chain **, STACK_OF(X509) *, X509 *, char *, char *);
+#endif
 int GRSTx509ChainFree(GRSTx509Chain *);
 
 #define GRST_HTTP_PORT         777
@@ -354,6 +368,7 @@ char      *GRSThttpUrlMildencode(char *);
 
 int GRSTx509NameCmp(char *, char *);
 
+#ifndef GRST_NO_OPENSSL
 int GRSTx509KnownCriticalExts(X509 *);
 
 int GRSTx509IsCA(X509 *);
@@ -368,6 +383,7 @@ GRSTgaclCred *GRSTx509CompactToCred(char *);
 
 __attribute__ ((deprecated))
 int GRSTx509CompactCreds(int *, int, size_t, char *, STACK_OF(X509) *, char *, X509 *);
+#endif 
 
 char *GRSTx509CachedProxyFind(char *, char *, char *);
 char *GRSTx509FindProxyFileName(void);
@@ -377,9 +393,14 @@ int GRSTx509ProxyDestroy(char *, char *, char *);
 int GRSTx509ProxyGetTimes(char *, char *, char *, time_t *, time_t *);
 int GRSTx509CreateProxyRequest(char **, char **, char *);
 int GRSTx509MakeProxyRequest(char **, char *, char *, char *);
-int GRSTx509StringToChain(STACK_OF(X509) **, char *);
+
 char *GRSTx509MakeDelegationID(void);
+
+#ifndef GRST_NO_OPENSSL
+int GRSTx509StringToChain(STACK_OF(X509) **, char *);
 char *GRSTx509MakeProxyFileName(char *, STACK_OF(X509) *);
+#endif
+
 int GRSTx509CacheProxy(char *, char *, char *, char *);
 
 #define GRST_HEADFILE   "gridsitehead.txt"
@@ -404,8 +425,10 @@ char *GRSThttpGetCGI(char *);
 
 time_t GRSTasn1TimeToTimeT(char *, size_t);
 int    GRSTasn1SearchTaglist(struct GRSTasn1TagList taglist[], int, char *);
+#ifndef GRST_NO_OPENSSL
 int    GRSTasn1ParseDump(BIO *, unsigned char *, long,
                          struct GRSTasn1TagList taglist[], int, int *);
+#endif
 int    GRSTasn1GetX509Name(char *, int, char *, char *,
                            struct GRSTasn1TagList taglist[], int);
 
index 3b914dd..fd83c2b 100644 (file)
@@ -67,7 +67,8 @@ build: apidoc build-lib \
        urlencode findproxyfile gsexec real-gridsite-admin.cgi
 
 build-lib: libgridsite_globus.so.$(VERSION) libgridsite_globus.a \
-           libgridsite.so.$(VERSION) libgridsite.a 
+           libgridsite.so.$(VERSION) libgridsite.a \
+           libgridsite_nossl.so.$(VERSION) libgridsite_nossl.a
 
 # First, normal versions using system OpenSSL rather than Globus OpenSSL
 
@@ -122,12 +123,12 @@ libgridsite_globus.so.$(VERSION): grst_err_globus.o \
        gcc -shared -Wl,-soname,libgridsite_globus.so.$(MINOR_VERSION) \
          -o libgridsite_globus.so.$(PATCH_VERSION) \
          grst_err_globus.o grst_x509_globus.o grst_gacl_globus.o grst_xacml_globus.o \
-         grst_http_globus.o grst_asn1_globus.o
+         grst_http_globus.o grst_asn1_globus.o grst_htcp_globus.o
        ln -sf libgridsite_globus.so.$(VERSION) libgridsite_globus.so
 
 libgridsite_globus.a: grst_err_globus.o grst_x509_globus.o grst_gacl_globus.o grst_http_globus.o grst_asn1_globus.o
        ar src libgridsite_globus.a \
-               grst_err_globus.o grst_x509_globus.o grst_gacl_globus.o grst_http_globus.o grst_asn1_globus.o
+               grst_err_globus.o grst_x509_globus.o grst_gacl_globus.o grst_http_globus.o grst_asn1_globus.o grst_htcp_globus.o
 
 grst_err_globus.o: grst_err.c ../interface/gridsite.h
        gcc -g $(MYCFLAGS) $(OPENSSL_GLOBUS_FLAGS) \
@@ -175,6 +176,49 @@ libgridsite_globus.a: libgridsite.a
 
 endif
 
+# then build versions without OpenSSL
+
+libgridsite_nossl.so.$(VERSION): grst_err_nossl.o \
+               grst_gacl_nossl.o grst_http_nossl.o \
+               grst_xacml_nossl.o grst_htcp_nossl.o 
+       gcc -shared -Wl,-soname,libgridsite_nossl.so.$(MINOR_VERSION) \
+         -o libgridsite_nossl.so.$(PATCH_VERSION) \
+         grst_err_nossl.o grst_gacl_nossl.o grst_xacml_nossl.o \
+         grst_http_nossl.o grst_htcp_nossl.o
+       ln -sf libgridsite_nossl.so.$(VERSION) libgridsite_nossl.so
+
+libgridsite_nossl.a: grst_err_nossl.o grst_gacl_nossl.o grst_http_nossl.o
+       ar src libgridsite_nossl.a \
+               grst_err_nossl.o grst_gacl_nossl.o grst_http_nossl.o grst_htcp_nossl.o
+
+grst_err_nossl.o: grst_err.c ../interface/gridsite.h
+       gcc -g $(MYCFLAGS) -DGRST_NO_OPENSSL \
+           -I/usr/kerberos/include \
+           -c grst_err.c \
+           -o grst_err_nossl.o
+
+grst_gacl_nossl.o: grst_gacl.c ../interface/gridsite.h
+       gcc -g $(MYCFLAGS) -DGRST_NO_OPENSSL \
+            -I/usr/kerberos/include `xml2-config --cflags` -c grst_gacl.c \
+            -o grst_gacl_nossl.o
+
+grst_xacml_nossl.o: grst_xacml.c ../interface/gridsite.h
+       gcc -g $(MYCFLAGS) -DGRST_NO_OPENSSL \
+            -I/usr/kerberos/include `xml2-config --cflags` -c grst_xacml.c \
+            -o grst_xacml_nossl.o
+
+grst_http_nossl.o: grst_http.c ../interface/gridsite.h
+       gcc -g $(MYCFLAGS) -DGRST_NO_OPENSSL \
+            -I/usr/kerberos/include -c grst_http.c \
+            -o grst_http_nossl.o
+
+grst_htcp_nossl.o: grst_htcp.c ../interface/gridsite.h
+       gcc -g $(MYCFLAGS) -DGRST_NO_OPENSSL \
+            -I/usr/kerberos/include -c grst_htcp.c \
+            -o grst_htcp_nossl.o
+
+# now the binary exectuables
+
 gsexec:        gsexec.c gsexec.h
        gcc -g -DVERSION=\"$(PATCH_VERSION)\" $(MYCFLAGS) \
            -o gsexec gsexec.c
@@ -402,6 +446,14 @@ install-lib:
                                  $(prefix)/$(libdir)/libgridsite_globus.so.$(MAJOR_VERSION)
        ln -sf libgridsite_globus.so.$(PATCH_VERSION) \
                                  $(prefix)/$(libdir)/libgridsite_globus.so.$(MINOR_VERSION)
+       cp -f  libgridsite_nossl.a $(prefix)/$(libdir)
+       cp -f  libgridsite_nossl.so.$(PATCH_VERSION) $(prefix)/$(libdir)
+       ln -sf libgridsite_nossl.so.$(PATCH_VERSION) \
+                                 $(prefix)/$(libdir)/libgridsite_nossl.so
+       ln -sf libgridsite_nossl.so.$(PATCH_VERSION) \
+                                 $(prefix)/$(libdir)/libgridsite_nossl.so.$(MAJOR_VERSION)
+       ln -sf libgridsite_nossl.so.$(PATCH_VERSION) \
+                                 $(prefix)/$(libdir)/libgridsite_nossl.so.$(MINOR_VERSION)
 
 install-slashgrid: slashgrid
        cp -f slashgrid $(prefix)/sbin
index bc92a87..66b3eff 100644 (file)
@@ -3,6 +3,7 @@
 #include <stdio.h>
 #include <string.h>
 
+#ifndef GRST_NO_OPENSSL
 #include <openssl/x509_vfy.h>
 #include <openssl/err.h>
 #include <openssl/pem.h>
@@ -10,6 +11,7 @@
 #include <openssl/buffer.h>
 #include <openssl/objects.h>
 #include <openssl/asn1.h>
+#endif
 
 #include "gridsite.h"
 
index 8208324..2a0159a 100644 (file)
@@ -50,6 +50,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 
+#ifndef GRST_NO_OPENSSL
 #include <openssl/x509.h>
 #include <openssl/x509v3.h>
 #include <openssl/err.h>
@@ -62,6 +63,7 @@
 #include <openssl/bio.h>    
 #include <openssl/des.h>    
 #include <openssl/rand.h>
+#endif
 
 #include "gridsite.h"
 
index 4d631c9..27a61fc 100755 (executable)
@@ -184,6 +184,8 @@ fi
 %attr(-, root, root) %{prefix}/%{_lib}/libgridsite.so
 %attr(-, root, root) %{prefix}/%{_lib}/libgridsite_globus.so.%{version}
 %attr(-, root, root) %{prefix}/%{_lib}/libgridsite_globus.so
+%attr(-, root, root) %{prefix}/%{_lib}/libgridsite_nossl.so.%{version}
+%attr(-, root, root) %{prefix}/%{_lib}/libgridsite_nossl.so
 %attr(-, root, root) %{prefix}/share/doc/gridsite-${MINOR_VERSION:-1.x}
 
 %files devel
@@ -191,6 +193,7 @@ fi
 %attr(-, root, root) %{prefix}/include/gridsite-gacl.h
 %attr(-, root, root) %{prefix}/lib/libgridsite.a
 %attr(-, root, root) %{prefix}/lib/libgridsite_globus.a
+%attr(-, root, root) %{prefix}/lib/libgridsite_nossl.a
 
 %files apache
 %attr(-, root, root) %{prefix}/share/man/man8/mod_gridsite.8.gz