Commit Graph

9 Commits

Author SHA1 Message Date
Jung-uk Kim
07f5430d5c Make libmp(3) buildable. 2018-09-19 07:05:31 +00:00
Pedro F. Giffuni
5e53a4f90f lib: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
2017-11-26 02:00:33 +00:00
Conrad Meyer
d0725e2250 libmp: Fix trivial buffer overrun
fgetln yields a non-NUL-terminated buffer and its length.  This routine
attempted to NUL-terminate it, but did not allocate space for the NUL.  So,
allocate space for the NUL.

Reported by:	Coverity
CID:		1017457
Sponsored by:	EMC / Isilon Storage Division
2016-05-12 03:53:20 +00:00
Ed Schouten
b3aaa0cc21 Rename all symbols in libmp(3) to mp_*, just like Solaris.
The function pow() in libmp(3) clashes with pow(3) in libm. We could
rename this single function, but we can just take the same approach as
the Solaris folks did, which is to prefix all function names with mp_.

libmp(3) isn't really popular nowadays. I suspect not a single
application in ports depends on it. There's still a chance, so I've
increased the SHLIB_MAJOR and __FreeBSD_version.

Reviewed by:	deischen, rdivacky
2009-02-26 21:43:15 +00:00
Simon L. B. Nielsen
78078a569f Pass BN_CTX to internal functions instead of allocating it internally.
This allows msqrt() to only call BN_CTX_new() once intead of many times.

Suggested and reviewed by:	stefanf
2006-07-30 19:29:26 +00:00
Simon L. B. Nielsen
76f29359f7 Do not put BN_CTX structures on the stack, but instead allocate them
runtime using BN_CTX_new().  This is done since in OpenSSL 0.9.7e we
can only allocate BN_CTX on the stack by including an internal OpenSSL
header file, and in OpenSSL 0.9.8 BN_CTX is entirely opaque, so having
it on the stack is not possible at all.

This is done as preparation for OpenSSL 0.9.8b import.

Tested on:	amd64 i386 ia64
Tested with:	src/tools/regression/lib/libmp
2006-07-28 23:00:16 +00:00
Mark Murray
cb9c19ff86 Adjust for OpenSSL 0.9.7. 2003-01-28 23:03:15 +00:00
Matthew Dillon
971e707742 Add __FBSDID()s to libmp 2001-09-30 21:58:17 +00:00
Dima Dorfman
656c5bc76b This is the traditional BSD libmp interface implemented in terms of
the OpenSSL BIGNUM interface.  It is provided for compatibility only
and should not be used in new code.
2001-07-29 08:49:15 +00:00