diff options
author | tv <tv> | 1998-03-18 00:49:33 +0000 |
---|---|---|
committer | tv <tv> | 1998-03-18 00:49:33 +0000 |
commit | ec42de8c0c89d4594fbe74fcc3b36e7ab830d580 (patch) | |
tree | a280508a4106d136efb9c3b59c2e0ca288b280cb /security | |
parent | 1e0c5c5bee2cf4117fc0dc6229414b063b800329 (diff) | |
download | pkgsrc-ec42de8c0c89d4594fbe74fcc3b36e7ab830d580.tar.gz |
Import of a shared/static rsaref 2.0 library package. Originally based
on FreeBSD's port, but almost completely reworked. Differences:
- leaves out MD5 and uses NetBSD's libc MD5 routines
- all the includes are installed in ${PREFIX}/include/rsaref
- fetches it legally from ftp.rsa.com instead of sites outside the USA
- uses <bsd.lib.mk> to build the library
Diffstat (limited to 'security')
-rw-r--r-- | security/rsaref/Makefile | 58 | ||||
-rw-r--r-- | security/rsaref/files/Makefile | 12 | ||||
-rw-r--r-- | security/rsaref/files/md5 | 1 | ||||
-rw-r--r-- | security/rsaref/files/md5.h | 5 | ||||
-rw-r--r-- | security/rsaref/patches/patch-aa | 115 | ||||
-rw-r--r-- | security/rsaref/pkg/COMMENT | 1 | ||||
-rw-r--r-- | security/rsaref/pkg/DESCR | 21 | ||||
-rw-r--r-- | security/rsaref/pkg/PLIST | 17 |
8 files changed, 230 insertions, 0 deletions
diff --git a/security/rsaref/Makefile b/security/rsaref/Makefile new file mode 100644 index 00000000000..04fee4f04e6 --- /dev/null +++ b/security/rsaref/Makefile @@ -0,0 +1,58 @@ +# New ports collection makefile for: rsaref +# Version required: 2.0 +# +# Date created: 17 Feb 1998 +# Whom: tv@netbsd.org +# +# $NetBSD: Makefile,v 1.1.1.1 1998/03/18 00:49:33 tv Exp $ +# + +PKGNAME= rsaref-2.0 +DISTNAME= rsaref20 +CATEGORIES= security +RSA_SITE= ftp://ftp.rsa.com/rsaref/ +MASTER_SITES= ${RSA_SITE} +EXTRACT_SUFX= .tar.Z + +MAINTAINER= packages@NetBSD.ORG + +WRKSRC= ${WRKDIR}/source +RESTRICTED= "Cryptographic source usable only within the USA" +MIRROR_DISTFILE=no +IS_INTERACTIVE= yes + +do-fetch: +.if !defined(USA_RESIDENT) || ${USA_RESIDENT} != YES + @${ECHO} + @${ECHO} This package is legal for use only within the United States. + @${ECHO} You must set the variable USA_RESIDENT to YES to enable + @${ECHO} use of the rsaref package. + @${ECHO} + @${FALSE} +.else + @${MKDIR} ${WRKDIR} || ${TRUE} + @if [ ! -f ${DISTDIR}/${DISTFILES} ]; then \ + cd ${WRKDIR} && ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${RSA_SITE}README ${FETCH_AFTER_ARGS}; \ + cd ${_DISTDIR} && ${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${RSA_SITE}`egrep '^dist/U\.S\.-only-' ${WRKDIR}/README`/${DISTNAME}${EXTRACT_SUFX} ${FETCH_AFTER_ARGS}; \ + fi +.endif + +pre-configure: + @${RM} -f ${WRKSRC}/md5.h + @${CP} ${FILESDIR}/Makefile ${FILESDIR}/md5.h ${WRKSRC} + @${LN} -s . ${WRKSRC}/rsaref + +do-install: + ${MKDIR} ${PREFIX}/include/rsaref ${PREFIX}/share/doc/rsaref + cd ${WRKSRC} && \ + ${INSTALL_DATA} des.h global.h md2.h md5.h rsa.h rsaref.h \ + ${PREFIX}/include/rsaref + cd ${WRKSRC} && \ + ${INSTALL_DATA} librsaref.a librsaref.so.2.0 ${PREFIX}/lib + ${LN} -sf librsaref.so.2.0 ${PREFIX}/lib/librsaref.so.2 + ${LN} -sf librsaref.so.2.0 ${PREFIX}/lib/librsaref.so + ${LDCONFIG} || ${TRUE} + cd ${WRKDIR}/doc && \ + ${INSTALL_DATA} info.txt rsaref.txt ${PREFIX}/share/doc/rsaref + +.include <bsd.port.mk> diff --git a/security/rsaref/files/Makefile b/security/rsaref/files/Makefile new file mode 100644 index 00000000000..c26d0d9aa51 --- /dev/null +++ b/security/rsaref/files/Makefile @@ -0,0 +1,12 @@ +# $NetBSD: Makefile,v 1.1.1.1 1998/03/18 00:49:33 tv Exp $ + +LIB= rsaref +CFLAGS= -O2 -I. +SHLIB_MAJOR= 2 +SHLIB_MINOR= 0 +NOPROFILE= 1 + +SRCS= desc.c digit.c md2c.c nn.c prime.c rsa.c r_encode.c r_dh.c \ + r_enhanc.c r_keygen.c r_random.c r_stdlib.c + +.include <bsd.lib.mk> diff --git a/security/rsaref/files/md5 b/security/rsaref/files/md5 new file mode 100644 index 00000000000..dac22758028 --- /dev/null +++ b/security/rsaref/files/md5 @@ -0,0 +1 @@ +MD5 (rsaref20.tar.Z) = 6b8df27a1b0b0f7dfb81adac2c222395 diff --git a/security/rsaref/files/md5.h b/security/rsaref/files/md5.h new file mode 100644 index 00000000000..17d8998f948 --- /dev/null +++ b/security/rsaref/files/md5.h @@ -0,0 +1,5 @@ +/* $NetBSD: md5.h,v 1.1.1.1 1998/03/18 00:49:33 tv Exp $ */ +/* Include the system md5.h header file. */ +#ifndef _MD5_H_ +#include_next <md5.h> +#endif diff --git a/security/rsaref/patches/patch-aa b/security/rsaref/patches/patch-aa new file mode 100644 index 00000000000..8c9e53a7fb5 --- /dev/null +++ b/security/rsaref/patches/patch-aa @@ -0,0 +1,115 @@ +--- des.h.orig Fri Mar 25 14:01:48 1994 ++++ des.h Tue Feb 17 13:47:52 1998 +@@ -4,6 +4,8 @@ + #ifndef _DES_H_ + #define _DES_H_ 1 + ++#include <rsaref/global.h> ++ + #ifdef __cplusplus + extern "C" { + #endif +--- global.h.orig Fri Mar 25 14:01:46 1994 ++++ global.h Tue Feb 17 13:47:31 1998 +@@ -7,23 +7,17 @@ + #ifndef _GLOBAL_H_ + #define _GLOBAL_H_ 1 + +-/* PROTOTYPES should be set to one if and only if the compiler supports +- function argument prototyping. +- The following makes PROTOTYPES default to 1 if it has not already been +- defined as 0 with C compiler flags. +- */ +-#ifndef PROTOTYPES +-#define PROTOTYPES 1 +-#endif ++#include <sys/types.h> ++#include <sys/cdefs.h> + + /* POINTER defines a generic pointer type */ +-typedef unsigned char *POINTER; ++typedef caddr_t POINTER; + + /* UINT2 defines a two byte word */ +-typedef unsigned short int UINT2; ++typedef u_int16_t UINT2; + + /* UINT4 defines a four byte word */ +-typedef unsigned long int UINT4; ++typedef u_int32_t UINT4; + + #ifndef NULL_PTR + #define NULL_PTR ((POINTER)0) +@@ -33,14 +27,6 @@ + #define UNUSED_ARG(x) x = *(&x); + #endif + +-/* PROTO_LIST is defined depending on how PROTOTYPES is defined above. +- If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it +- returns an empty list. +- */ +-#if PROTOTYPES +-#define PROTO_LIST(list) list +-#else +-#define PROTO_LIST(list) () +-#endif ++#define PROTO_LIST(x) __P(x) + + #endif /* end _GLOBAL_H_ */ +--- md2.h.orig Fri Mar 25 14:01:49 1994 ++++ md2.h Tue Feb 17 13:48:43 1998 +@@ -22,6 +22,8 @@ + #ifndef _MD2_H_ + #define _MD2_H_ 1 + ++#include <rsaref/global.h> ++ + #ifdef __cplusplus + extern "C" { + #endif +--- r_random.c.orig Fri Mar 25 14:01:47 1994 ++++ r_random.c Tue Feb 17 13:50:33 1998 +@@ -8,7 +8,7 @@ + #include "global.h" + #include "rsaref.h" + #include "r_random.h" +-#include "md5.h" ++#include <rsaref/md5.h> + + #define RANDOM_BYTES_NEEDED 256 + +--- rsa.h.orig Fri Mar 25 14:01:45 1994 ++++ rsa.h Tue Feb 17 13:49:54 1998 +@@ -5,6 +5,11 @@ + Inc., created 1991. All rights reserved. + */ + ++#ifndef _RSA_H_ ++#define _RSA_H_ 1 ++ ++#include <rsaref/global.h> ++ + int RSAPublicEncrypt PROTO_LIST + ((unsigned char *, unsigned int *, unsigned char *, unsigned int, + R_RSA_PUBLIC_KEY *, R_RANDOM_STRUCT *)); +@@ -17,3 +22,5 @@ + int RSAPrivateDecrypt PROTO_LIST + ((unsigned char *, unsigned int *, unsigned char *, unsigned int, + R_RSA_PRIVATE_KEY *)); ++ ++#endif +--- rsaref.h.orig Fri Mar 25 14:01:49 1994 ++++ rsaref.h Tue Feb 17 13:48:26 1998 +@@ -8,9 +8,9 @@ + #ifndef _RSAREF_H_ + #define _RSAREF_H_ 1 + +-#include "md2.h" +-#include "md5.h" +-#include "des.h" ++#include <rsaref/md2.h> ++#include <rsaref/md5.h> ++#include <rsaref/des.h> + + #ifdef __cplusplus + extern "C" { diff --git a/security/rsaref/pkg/COMMENT b/security/rsaref/pkg/COMMENT new file mode 100644 index 00000000000..0f0a8e15243 --- /dev/null +++ b/security/rsaref/pkg/COMMENT @@ -0,0 +1 @@ +Encryption/authentication library, RSA/MDX/DES diff --git a/security/rsaref/pkg/DESCR b/security/rsaref/pkg/DESCR new file mode 100644 index 00000000000..b0d0b094897 --- /dev/null +++ b/security/rsaref/pkg/DESCR @@ -0,0 +1,21 @@ +RSAREF is a free, portable software developer's library of popular +encryption and authentication algorithms. The name "RSAREF" means +"RSA reference." RSA Laboratories intends RSAREF to serve as a free, +educational reference implementation of modern public- and secret-key +cryptography. + +RSAREF 2.0 supports the following algorithms: + + o RSA encryption and key generation, as defined by RSA + Laboratories' Public-Key Cryptography Standards (PKCS) + + o MD2 and MD5 message digests + + o DES (Data Encryption Standard) in cipher-block chaining mode + + o Diffie-Hellman key agreement + + o DESX, RSA Data Security's efficient, secure DES enhancement + + o Triple-DES, for added security with three DES operations + diff --git a/security/rsaref/pkg/PLIST b/security/rsaref/pkg/PLIST new file mode 100644 index 00000000000..145b9e937e7 --- /dev/null +++ b/security/rsaref/pkg/PLIST @@ -0,0 +1,17 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 1998/03/18 00:49:33 tv Exp $ +include/rsaref/des.h +include/rsaref/global.h +include/rsaref/md2.h +include/rsaref/md5.h +include/rsaref/rsa.h +include/rsaref/rsaref.h +@dirrm include/rsaref +lib/librsaref.a +lib/librsaref.so +lib/librsaref.so.2 +lib/librsaref.so.2.0 +@exec /sbin/ldconfig || /usr/bin/true +@unexec /sbin/ldconfig || /usr/bin/true +share/doc/rsaref/info.txt +share/doc/rsaref/rsaref.txt +@dirrm share/doc/rsaref |