Commit Graph

129 Commits

Author SHA1 Message Date
jschauma ba40d7ee64 Fix tyops pointed out by Igor Sobrado in PR misc/19627
openssl_rand(1)     - generater (generator?)
openssl_req(1)      - stateOrPrivinceName (stateOrProvinceName),
			eg. (e.g., Latin exempli gratia)
openssl_rsa(1)      - thse (these, perhaps those)
openssl_s_client(1) - implicitely (implicitly),
			renegociated (renegotiated)
openssl_x509(1)     - beginnging (beginning, whow!),
			repesents (represents)
2003-01-01 21:43:13 +00:00
lukem 93305911e9 Move libcrypto.so* from /usr/lib to /lib, as /sbin/cgdconfig needs it.
Requested by elric@.
2002-10-07 00:53:31 +00:00
thorpej 09a0767aa9 Only use the MKDYNAMICROOT semantics (i.e. -rpath=/lib,/usr/lib and
-dynamic-linker=/libexec/ld.elf_so) if the BINDIR of the program being
built is /bin or /sbin.

The reason we do this is because now all programs *except* those in
/bin and /sbin (i.e. the "special cases") match the default the compiler
uses, which is what is used for things in e.g. xsrc, pkgsrc, and other
random 3rd party programs.

This is done by decoupling where a shlib is installed from how it
is located.  Two new variables, SHLIBINSTALLDIR and SHLINKINSTALLDIR,
contain the former information, and key off MKDYNAMICROOT only.  SHLIBDIR
and SHLINKDIR contain the latter, and key off MKDYNAMICROOT and BINDIR.

The SHLIBINSTALLDIR, SHLIBDIR, _LIBSODIR, SHLINKINSTALLDIR, and
SHLINKDIR parameters are moved to a new <bsd.shlib.mk>; see bsd.README
for usage details.
2002-09-27 21:37:50 +00:00
itojun 633fb3b891 dummy funtion decls 2002-09-26 13:06:25 +00:00
itojun d24389cf67 MDC2 is a patented algorithm; don't ship it in default libcrypto.
MKCRYPTO_MDC2 will build a separate library, libcrypto_mdc2.
2002-09-26 13:05:54 +00:00
thorpej 93b1f286b7 Add (commented out) CPP flags for making DES faster on StrongARM
and XScale systems.
2002-09-20 23:59:40 +00:00
itojun 50d422c24f e_os.h is not part of exported openssl interface, so don't install it into
/usr/include/openssl (e_os.h has an explicit comment about it).  it obviously
is a bug in openssl 0.9.6 Makefile.
based on openssl 0.9.7 snapshot.
2002-08-31 10:46:36 +00:00
jdarrow 48ee0561fe Belatedly bump libdes shared library major number, due to bump of
libcrypto shared major when we moved from OpenSSL 0.9.5 to 0.9.6.

Add note to libcrypto shlib_version file to remind people to also
update libdes shlib_version.
2002-08-20 13:49:55 +00:00
lukem 91d06a031b More use of ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path 2002-08-19 13:35:05 +00:00
lukem ebb6fc9eb8 Use ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path (etc).
(Reduces make output by ~ 20%)
2002-08-19 09:41:27 +00:00
itojun 6043eb4818 regen manpages 2002-08-09 16:15:36 +00:00
itojun 182c0b6e08 sync with 0.9.6f. prevents DoS attack and regen of manpages. 2002-08-08 23:47:34 +00:00
itojun 151d7bb9f3 regen openssl manpage from 0.9.6e source. 2002-07-31 01:45:20 +00:00
thorpej c029cf4e92 Remove -nostdinc from CPPFLAGS. That should only be used when
bsd.lib.mk wants it to be used.
2002-06-26 16:58:09 +00:00
thorpej 8893ba2f3c Back out rev 1.20. 2002-06-26 16:30:46 +00:00
veego d7a9005d0f Back out rev 1.18:
Remove -I${DESTDIR}/usr/include since it's redundant.

It may be redundant in some environments, but not in all.
2002-06-26 15:21:50 +00:00
thorpej 24e460d382 If any of __pentiumpro__, __tune_pentiumpro__, or __tune_i686__ are
defined, use bf_enc_686.S, else bf_enc_586.S.
2002-06-16 18:35:02 +00:00
thorpej d8a2597f4b * Don't put the pathname to the host-tool compiler into the library.
Instead, inject the compiler version info from ${CC} -v.
* Don't put the date into the library.  Instead, inject the OS version
  info.
2002-06-16 17:57:29 +00:00
matt 1ece0e0c9a Remove -I${DESTDIR}/usr/include since it's redundant. 2002-06-15 02:01:23 +00:00
bjh21 0de3f91b56 Don't try to put the host's /usr/include on the target compiler's include path.
This causes Bad Things to happen.  Instead, use the target's /usr/include.
2002-06-11 22:55:34 +00:00
itojun 7c75b5ec2f sync with 0.9.6d. shlib minor for libssl and libcrypto
is cranked for additional functions.
2002-06-09 16:12:52 +00:00
itojun d79e894958 use weak_alias to make libcrypto_{idea,rc5} actually useful. 2002-06-09 02:14:30 +00:00
wiz 56b4d2cb0c Move code that tries to determine shlib major into MKPIC != "no" case. 2002-05-02 16:24:24 +00:00
lukem b7ca7acccf Don't hard link to symlinks, as it's not portable.
Based on [toolchain/14119] from Chris G. Demetriou.
2002-02-26 00:57:12 +00:00
mycroft a3c74e7653 Actually remove this cruft until it's fixed.
With des_enc.S present, it was getting caught by suffix rules when there was no
.depend file.
2002-02-12 21:45:37 +00:00
ross dc5571b22e Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:21:55 +00:00
ross 9856438e91 generate & symbolically 2002-02-07 09:24:04 +00:00
ross 814f296b77 Generate <>& symbolically. 2002-02-07 07:00:09 +00:00
lukem efcc9a4c9d * Add user-controlled mk.conf variables
- SHLIBDIR	Location to install shared libraries if ${USE_SHLIBDIR}
			is "yes".  Defaults to "/usr/lib".

	- USE_SHLIBDIR	If "yes", install shared libraries in ${SHLIBDIR}
			instead of ${LIBDIR}.  Defaults to "no".
			Sets ${_LIBSODIR} to the appropriate value.
			This may be set by individual Makefiles as well.

	- SHLINKDIR	Location of shared linker.  Defaults to "/usr/libexec".
			If != "/usr/libexec", change the dynamic-linker
			encoded in shared programs

* Set USE_SHLIBDIR for libraries used by /bin and /sbin:
	libc libcrypt libcrypto libedit libipsec libkvm libm libmi387
	libtermcap libutil libz

* If ${_LIBSODIR} != ${LIBDIR}, add symlinks from ${LIBDIR}/${LIB}.so*
  to ${_LIBSODIR}/${LIB}.so* for compatibility.

* Always install /sbin/init statically (for now)


The net effect of these changes depends on how the variables are set:

  1.)	If nothing is set or changed, there is no change from the
	current behaviour:
		- Static /bin, /sbin, and bits of /usr/*
		- Dynamic rest
		- Shared linker is /usr/libexec/ld*so

  2.)	If the following make variables are set:
		LDSTATIC=
		SHLINKDIR=/lib
		SHLIBDIR=/lib
	Then the behaviour becomes:
		- Dynamic tools
		- .so libraries used by /bin and /sbin are installed to /lib,
		  with symlinks from /usr/lib/lib*so to -> /lib/lib*so
		  where appropriate
		- Shared linker is /lib/ld*so

  3.)	As per 2.), but add the following variable:
		USE_SHLIBDIR=yes
	This forces all .so's to be instaleld in /lib (with compat
	symlinks), not just those tagged by their Makefiles to be.
	Again, compat symlinks are installed
2001-12-28 01:32:37 +00:00
simonb f278adc002 The des_opts program suggests just "-DDES_UNROLL" on my 5000/260. 2001-09-11 04:10:41 +00:00
thorpej ba08e565cc Use MACHINE_CPU rather than an (incomplete) substitution of
MACHINE_ARCH;.
2001-09-10 02:59:09 +00:00
thorpej 792a41ba35 Do the CPU-specific optimization flags a better way, suggested
by Simon Burge.
2001-09-10 02:56:57 +00:00
tls c9d0af63e8 Use MACHINE_CPU, not MACHINE_ARCH, to select optimizations. Add BF_PTR/BF_PTR2 tweaks to bf.inc 2001-09-09 21:22:09 +00:00
tls f52ec0ef7e tweak the x86 options a bit 2001-09-09 20:54:25 +00:00
tls ad1c0d6d54 Add some of the options to select optimizations of the C DES code for
different architectures.

Doesn't help some platforms much, helps others quite a bit.  These
options are from options.txt in the libdes/libcrypto distribution; it
would probably be best to test and replace them with what's best with
the current gcc on each of our architectures.
2001-09-09 20:41:47 +00:00
thorpej 6fcde7aad3 Grumble. If you make external references, the code MUST be PIC
for shared libraries.  This code is not PIC, so DO NOT BUILD IT.
2001-09-09 19:55:24 +00:00
tls 43e3cefe90 Add assembly versions of DES transforms for x86; a performance improvement
of about 3.5X on my 1333MHz Athlon (about 37MB/sec!) compared to the old
C versions.

We could boost the speed of the C versions on most other architectures with
des.inc files that set the compile-time flags (DES_PTR, DES_RISC1, DES_RISC2)
correctly; at the moment they aren't set at all.
2001-09-09 10:44:24 +00:00
wiz 40ac848024 Fix various misspellings of compatible/compatibility. 2001-06-11 01:50:48 +00:00
sommerfeld 99c2c3dfe8 Fix (work around?) bin/12804.
(idea.h, rc5.h, and rsa.h appeared twice in INCS, confusing make -j)
2001-05-02 13:06:14 +00:00
itojun 768e5b5fad comment; use latest pod2man 2001-04-13 00:18:10 +00:00
itojun c0fa60f50c fix manpage paths to meet 0.9.6a. most of short names are escaped as
openssl_xx(1) or openssl_xx(3), as they are way too generic.
2001-04-12 10:45:33 +00:00
itojun 35a07da1df use openssl 0.9.6a. shlib major # is bumped for libcrypto, libssl and
all kerberos libraries.
2001-04-12 07:48:03 +00:00
wiz faed862d8f Regenerate with pod2man-1.0.2, which produces a bit better output. 2001-04-09 12:29:33 +00:00
wiz 6b5ab77765 fo -> for 2001-04-02 18:25:34 +00:00
enami b812acc76c Pass -B to the make command used to make print-shlib-{major,minor} so
that make install with -j option works.
2001-02-11 01:21:24 +00:00
wiz c9be164d2f Fix date (22/Jul/2000 instead of 22/Jul/100).
(pod2man problem?)
2001-01-09 12:11:27 +00:00
lukem c449d2d4f2 use more standard %lld in favour of %qd 2001-01-04 15:35:22 +00:00
itojun c68d2a0c47 s/MAN1/MAN/ 2000-10-07 04:23:32 +00:00
itojun 05a03575d1 avoid conflicting manpage filenames (like err.3) 2000-10-05 01:55:49 +00:00
itojun 5774bbe1fb describe crypto_{idea,rc5} 2000-10-04 09:10:34 +00:00
itojun 4b7b1d8d36 more change name to meet the filename 2000-10-04 07:22:56 +00:00
itojun f434bd4ff6 change name to meet the filename 2000-10-04 07:21:22 +00:00
itojun d3e00e4496 move ssl(4) to ssl(3). sorry for the mess. 2000-10-04 07:15:06 +00:00
itojun 23a6673513 modify some chapters 2000-10-04 06:52:11 +00:00
itojun 818f52495c avoid RCS tags 2000-10-04 06:46:13 +00:00
itojun 5ca577ee77 add manpages for libcrypto. still need to review contents. 2000-10-04 05:58:15 +00:00
itojun a20f489194 add manpages generated by pod2man. need fixes here and there. 2000-10-04 05:41:25 +00:00
itojun 57e22c0d8a a clean target.
move config.5 to openssl.cnf.5.
2000-10-04 05:39:08 +00:00
itojun 6e50408d00 Makefile for generating manpage (require perl, should be used offline) 2000-10-04 05:34:15 +00:00
itojun 169eefc02f move rc5/idea dummy functions from crypto/dist/openssl/crypto to lib/libcrypto.
they are not part of the openssl distribution.
suggested by thorpej.
2000-10-01 22:17:59 +00:00
itojun e5e807d114 always compile RSA into libcrypto.
MKCRYPTO disables the whole crypto tree, and in that case,
we will not have RSA (nor libcrypto) with us.
2000-09-30 12:21:51 +00:00
itojun 8d26d03189 repair openssl (libcrypto) for non-32bit architecture.
don't use unsigned long where 32bit unsigned variable is asked for.
use u_int32_t.  (not sure if uint32_t is better or not, but anyway,
u_int32_t <-> uint32_t should not raise binary compatibility issue)
PR10921.

TODO: have arch-dependent Makefiles where we supply -DFOO for optimization.
(do not change size of variable though)

XXX: we should actually nuke all other #ifdef in /usr/include/openssl/*.h,
however, that needs a lot of work and will make future openssl upgrade harder.

remove RC5 and IDEA by default.  build them separately as
libcrypto_{rc5,idea}.a.  put dummy function, which is "warning to stderr
and exit(1)".  NOCRYPTO_{RC5,IDEA} are obsoleted.
PR10883.
2000-09-30 00:23:28 +00:00
jhawk a022cf9d37 Use
${MAKE}
instead of
  make
2000-08-30 23:51:46 +00:00
thorpej cf6fc32958 Add support for building the assembly versions of some BIGNUM
routines from OpenSSL.  Speeds up DSA significantly.  A similar
gain should also be seen for RSA.

Before:
Doing 512 bit sign dsa's for 10s: 965 512 bit DSA signs in 9.97s
Doing 512 bit verify dsa's for 10s: 766 512 bit DSA verify in 9.93s
Doing 1024 bit sign dsa's for 10s: 276 1024 bit DSA signs in 9.99s
Doing 1024 bit verify dsa's for 10s: 217 1024 bit DSA verify in 9.93s
                  sign    verify    sign/s verify/s
dsa  512 bits   0.0103s   0.0130s     96.8     77.1
dsa 1024 bits   0.0362s   0.0458s     27.6     21.9

After:
Doing 512 bit sign dsa's for 10s: 3742 512 bit DSA signs in 9.88s
Doing 512 bit verify dsa's for 10s: 3065 512 bit DSA verify in 9.92s
Doing 1024 bit sign dsa's for 10s: 1357 1024 bit DSA signs in 9.99s
Doing 1024 bit verify dsa's for 10s: 1094 1024 bit DSA verify in 9.83s
                  sign    verify    sign/s verify/s
dsa  512 bits   0.0026s   0.0032s    378.7    309.0
dsa 1024 bits   0.0074s   0.0090s    135.8    111.3
2000-07-31 19:57:30 +00:00
thorpej 557e12076d Add support for building the assembly version of RMD160 from OpenSSL.
Before:
Doing rmd160 for 3s on 8 size blocks: 778828 rmd160's in 3.00s
Doing rmd160 for 3s on 64 size blocks: 430214 rmd160's in 3.00s
Doing rmd160 for 3s on 256 size blocks: 182108 rmd160's in 3.00s
Doing rmd160 for 3s on 1024 size blocks: 55050 rmd160's in 3.00s
Doing rmd160 for 3s on 8192 size blocks: 7339 rmd160's in 3.00s
type              8 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
rmd160            2076.87k     9177.90k    15539.88k    18790.40k    20040.36k

After:
Doing rmd160 for 3s on 8 size blocks: 1084941 rmd160's in 3.00s
Doing rmd160 for 3s on 64 size blocks: 617966 rmd160's in 3.00s
Doing rmd160 for 3s on 256 size blocks: 267381 rmd160's in 2.99s
Doing rmd160 for 3s on 1024 size blocks: 82001 rmd160's in 3.00s
Doing rmd160 for 3s on 8192 size blocks: 10974 rmd160's in 3.00s
type              8 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
rmd160            2893.18k    13183.27k    22892.82k    27989.67k    29966.34k
2000-07-31 19:22:04 +00:00
thorpej cb83ceb68d Add support for building the assembly version of MD5 from OpenSSL.
Before:
Doing md5 for 3s on 8 size blocks: 1490796 md5's in 3.00s
Doing md5 for 3s on 64 size blocks: 895849 md5's in 3.00s
Doing md5 for 3s on 256 size blocks: 410807 md5's in 3.00s
Doing md5 for 3s on 1024 size blocks: 129416 md5's in 3.00s
Doing md5 for 3s on 8192 size blocks: 17527 md5's in 3.00s
type              8 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
md5               3975.46k    19111.45k    35055.53k    44173.99k    47860.39k

After:
Doing md5 for 3s on 8 size blocks: 2041410 md5's in 3.00s
Doing md5 for 3s on 64 size blocks: 1345402 md5's in 3.00s
Doing md5 for 3s on 256 size blocks: 669827 md5's in 3.10s
Doing md5 for 3s on 1024 size blocks: 221744 md5's in 2.96s
Doing md5 for 3s on 8192 size blocks: 30685 md5's in 3.00s
type              8 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
md5               5443.76k    28701.91k    56968.68k    76711.44k    83790.51k
2000-07-31 19:08:02 +00:00
thorpej dacf9960bf Add support for building the assembly versions of Blowfish encrypt
and decrypt from OpenSSL.  Right now we only build the 586 version,
but eventually we will be able to build the 686 version based on a
CPP flag defined as a result of using `cc -mcpu=pentiumpro'.

We don't build the assembly version of BF_cbc_encrypt(), as it would
have to be rewritten to be PIC.

Performance difference is quite noticeable.

Before:
Doing blowfish cbc for 3s on 8 size blocks: 2891026 blowfish cbc's in 2.97s
Doing blowfish cbc for 3s on 64 size blocks: 411766 blowfish cbc's in 3.10s
Doing blowfish cbc for 3s on 256 size blocks: 104721 blowfish cbc's in 3.00s
Doing blowfish cbc for 3s on 1024 size blocks: 26291 blowfish cbc's in 2.98s
Doing blowfish cbc for 3s on 8192 size blocks: 3290 blowfish cbc's in 3.10s
type              8 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
blowfish cbc      7787.28k     8755.16k     8936.19k     9034.22k     8954.05k

After:
Doing blowfish cbc for 3s on 8 size blocks: 4573792 blowfish cbc's in 3.10s
Doing blowfish cbc for 3s on 64 size blocks: 713440 blowfish cbc's in 2.99s
Doing blowfish cbc for 3s on 256 size blocks: 183125 blowfish cbc's in 3.00s
Doing blowfish cbc for 3s on 1024 size blocks: 46221 blowfish cbc's in 3.00s
Doing blowfish cbc for 3s on 8192 size blocks: 5787 blowfish cbc's in 3.00s
type              8 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
blowfish cbc     12156.26k    15270.96k    15626.67k    15776.77k    15802.37k
2000-07-31 18:39:04 +00:00
thorpej caacba233b Rework this so what we can include arch-specific versions
of the crypto Makefile includes.
2000-07-31 17:04:05 +00:00
mrg 218aaf9ee5 bump libcrypto minor 2000-07-17 02:21:18 +00:00
mrg f23f12cbc5 update for openssl 0.9.5a 2000-07-16 07:16:20 +00:00
veego 94a5610765 Add CPPFLAGS+= -DNO_{RSA,IDEA,RC5}. 2000-07-05 14:00:38 +00:00
thorpej df83a2a3cd Add MK... variables to enable/disable various aspects of building
crypto support into the system.  See share/mk/bsd.README for more
a full description.
2000-06-23 06:01:10 +00:00
thorpej 9afca06751 Add cleaned up versions of des_set_random_generator_seed(),
des_new_random_key(), and des_init_random_number_generator()
from the crypto-us libdes.
2000-06-21 19:47:37 +00:00
thorpej 1013bcab9c Add cleaned up versions of des_set_random_generator_seed(),
des_new_random_key(), and des_init_random_number_generator()
from the crypto-us libdes.

While I'm here, fix a serious bug in des_init_random_number_generator()
whereby the accumlated data to be hashed was zero'd *before* actually
being hashed.  NOTE: The bug only affects people who are not using the
rnd(4) in-kernel random number generator, and it is worth noting that
the resulting keys are not always the same, but are likely easy to
determine.
2000-06-21 19:46:16 +00:00
thorpej c7fe9dcc88 s/CFLAGS/CPPFLAGS/g 2000-06-21 19:34:22 +00:00
thorpej e352d2ca43 Fix installing <kerberosIV/des.h> 2000-06-20 21:49:02 +00:00
thorpej e7d6b96938 Merge a bunch of things from crypto-us and crypto-intl into basesrc,
adding support for Heimdal/KTH Kerberos where easy to do so.  Eliminate
bsd.crypto.mk.

There is still a bunch more work to do, but crypto is now more-or-less
fully merged into the base NetBSD distribution.
2000-06-20 06:00:24 +00:00
thorpej b50999826e Fixup the OpenSSL library builds. 2000-06-16 06:16:37 +00:00
thorpej 285b0ffbdd Import libcrypto build framework from cryptosrc-intl. 2000-06-16 04:21:31 +00:00