sync with 0.9.6d. shlib minor for libssl and libcrypto
is cranked for additional functions.
This commit is contained in:
parent
7720435b28
commit
7c75b5ec2f
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile.openssl,v 1.5 2000/09/30 12:21:51 itojun Exp $
|
||||
# $NetBSD: Makefile.openssl,v 1.6 2002/06/09 16:12:52 itojun Exp $
|
||||
|
||||
.ifndef _MAKEFILE_OPENSSL_INCLUDED
|
||||
_MAKEFILE_OPENSSL_INCLUDED=1
|
||||
@ -6,6 +6,7 @@ _MAKEFILE_OPENSSL_INCLUDED=1
|
||||
.include <bsd.own.mk>
|
||||
|
||||
OPENSSLSRC= ${CRYPTODIST}/openssl
|
||||
CPPFLAGS+= -DOPENSSLDIR=\"/etc/openssl\"
|
||||
CPPFLAGS+= -DOPENSSLDIR=\"/etc/openssl\"
|
||||
CPPFLAGS+= -DDSO_DLFCN -DHAVE_DLFCN_H
|
||||
|
||||
.endif
|
||||
|
131
crypto/dist/openssl/FAQ
vendored
131
crypto/dist/openssl/FAQ
vendored
@ -8,6 +8,7 @@ OpenSSL - Frequently Asked Questions
|
||||
* How can I contact the OpenSSL developers?
|
||||
* Where can I get a compiled version of OpenSSL?
|
||||
* Why aren't tools like 'autoconf' and 'libtool' used?
|
||||
* What is an 'engine' version?
|
||||
|
||||
[LEGAL] Legal questions
|
||||
|
||||
@ -27,13 +28,14 @@ OpenSSL - Frequently Asked Questions
|
||||
* How can I remove the passphrase on a private key?
|
||||
* Why can't I use OpenSSL certificates with SSL client authentication?
|
||||
* Why does my browser give a warning about a mismatched hostname?
|
||||
* How do I install a CA certificate into a browser?
|
||||
|
||||
[BUILD] Questions about building and testing OpenSSL
|
||||
|
||||
* Why does the linker complain about undefined symbols?
|
||||
* Why does the OpenSSL test fail with "bc: command not found"?
|
||||
* Why does the OpenSSL test fail with "bc: 1 no implemented"?
|
||||
* Why does the OpenSSL compilation fail on Alpha True64 Unix?
|
||||
* Why does the OpenSSL compilation fail on Alpha Tru64 Unix?
|
||||
* Why does the OpenSSL compilation fail with "ar: command not found"?
|
||||
* Why does the OpenSSL compilation fail on Win32 with VC++?
|
||||
|
||||
@ -57,7 +59,7 @@ OpenSSL - Frequently Asked Questions
|
||||
* Which is the current version of OpenSSL?
|
||||
|
||||
The current version is available from <URL: http://www.openssl.org>.
|
||||
OpenSSL 0.9.6b was released on July 9th, 2001.
|
||||
OpenSSL 0.9.6d was released on 9 May, 2002.
|
||||
|
||||
In addition to the current stable release, you can also access daily
|
||||
snapshots of the OpenSSL development version at <URL:
|
||||
@ -121,6 +123,12 @@ A number of Linux and *BSD distributions include OpenSSL.
|
||||
autoconf will probably be used in future OpenSSL versions. If it was
|
||||
less Unix-centric, it might have been used much earlier.
|
||||
|
||||
* What is an 'engine' version?
|
||||
|
||||
With version 0.9.6 OpenSSL was extended to interface to external crypto
|
||||
hardware. This was realized in a special release '0.9.6-engine'. With
|
||||
version 0.9.7 (not yet released) the changes were merged into the main
|
||||
development line, so that the special release is no longer necessary.
|
||||
|
||||
[LEGAL] =======================================================================
|
||||
|
||||
@ -146,7 +154,7 @@ holders claim that you infringe on their rights if you use OpenSSL with
|
||||
their software on operating systems that don't normally include OpenSSL.
|
||||
|
||||
If you develop open source software that uses OpenSSL, you may find it
|
||||
useful to choose an other license than the GPL, or state explicitely that
|
||||
useful to choose an other license than the GPL, or state explicitly that
|
||||
"This program is released under the GPL with the additional exemption that
|
||||
compiling, linking, and/or using OpenSSL is allowed." If you are using
|
||||
GPL software developed by others, you may want to ask the copyright holder
|
||||
@ -186,7 +194,7 @@ environment variable HOME is set, then the seeding file is $HOME/.rnd.
|
||||
If neither RANDFILE nor HOME is set, versions up to OpenSSL 0.9.6 will
|
||||
use file .rnd in the current directory while OpenSSL 0.9.6a uses no
|
||||
default seeding file at all. OpenSSL 0.9.6b and later will behave
|
||||
similarly to 0.9.6a, but will use a default of "C:" for HOME on
|
||||
similarly to 0.9.6a, but will use a default of "C:\" for HOME on
|
||||
Windows systems if the environment variable has not been set.
|
||||
|
||||
If the default seeding file does not exist or is too short, the "PRNG
|
||||
@ -297,7 +305,7 @@ there is little point presenting a certificate which the server will
|
||||
reject.
|
||||
|
||||
The solution is to add the relevant CA certificate to your servers "trusted
|
||||
CA list". How you do this depends on the server sofware in uses. You can
|
||||
CA list". How you do this depends on the server software in uses. You can
|
||||
print out the servers list of acceptable CAs using the OpenSSL s_client tool:
|
||||
|
||||
openssl s_client -connect www.some.host:443 -prexit
|
||||
@ -316,6 +324,26 @@ Browsers expect the server's hostname to match the value in the commonName
|
||||
(CN) field of the certificate. If it does not then you get a warning.
|
||||
|
||||
|
||||
* How do I install a CA certificate into a browser?
|
||||
|
||||
The usual way is to send the DER encoded certificate to the browser as
|
||||
MIME type application/x-x509-ca-cert, for example by clicking on an appropriate
|
||||
link. On MSIE certain extensions such as .der or .cacert may also work, or you
|
||||
can import the certificate using the certificate import wizard.
|
||||
|
||||
You can convert a certificate to DER form using the command:
|
||||
|
||||
openssl x509 -in ca.pem -outform DER -out ca.der
|
||||
|
||||
Occasionally someone suggests using a command such as:
|
||||
|
||||
openssl pkcs12 -export -out cacert.p12 -in cacert.pem -inkey cakey.pem
|
||||
|
||||
DO NOT DO THIS! This command will give away your CAs private key and
|
||||
reduces its security to zero: allowing anyone to forge certificates in
|
||||
whatever name they choose.
|
||||
|
||||
|
||||
[BUILD] =======================================================================
|
||||
|
||||
* Why does the linker complain about undefined symbols?
|
||||
@ -359,9 +387,9 @@ and compile/install it. GNU bc (see http://www.gnu.org/software/software.html
|
||||
for download instructions) can be safely used, for example.
|
||||
|
||||
|
||||
* Why does the OpenSSL compilation fail on Alpha True64 Unix?
|
||||
* Why does the OpenSSL compilation fail on Alpha Tru64 Unix?
|
||||
|
||||
On some Alpha installations running True64 Unix and Compaq C, the compilation
|
||||
On some Alpha installations running Tru64 Unix and Compaq C, the compilation
|
||||
of crypto/sha/sha_dgst.c fails with the message 'Fatal: Insufficient virtual
|
||||
memory to continue compilation.' As far as the tests have shown, this may be
|
||||
a compiler bug. What happens is that it eats up a lot of resident memory
|
||||
@ -439,10 +467,43 @@ OpenSSL. This is described in the threads(3) manpage.
|
||||
|
||||
* I've compiled a program under Windows and it crashes: why?
|
||||
|
||||
This is usually because you've missed the comment in INSTALL.W32. You
|
||||
must link with the multithreaded DLL version of the VC++ runtime library
|
||||
otherwise the conflict will cause a program to crash: typically on the
|
||||
first BIO related read or write operation.
|
||||
This is usually because you've missed the comment in INSTALL.W32.
|
||||
Your application must link against the same version of the Win32
|
||||
C-Runtime against which your openssl libraries were linked. The
|
||||
default version for OpenSSL is /MD - "Multithreaded DLL".
|
||||
|
||||
If you are using Microsoft Visual C++'s IDE (Visual Studio), in
|
||||
many cases, your new project most likely defaulted to "Debug
|
||||
Singlethreaded" - /ML. This is NOT interchangeable with /MD and your
|
||||
program will crash, typically on the first BIO related read or write
|
||||
operation.
|
||||
|
||||
For each of the six possible link stage configurations within Win32,
|
||||
your application must link against the same by which OpenSSL was
|
||||
built. If you are using MS Visual C++ (Studio) this can be changed
|
||||
by:
|
||||
|
||||
1. Select Settings... from the Project Menu.
|
||||
2. Select the C/C++ Tab.
|
||||
3. Select "Code Generation from the "Category" drop down list box
|
||||
4. Select the Appropriate library (see table below) from the "Use
|
||||
run-time library" drop down list box. Perform this step for both
|
||||
your debug and release versions of your application (look at the
|
||||
top left of the settings panel to change between the two)
|
||||
|
||||
Single Threaded /ML - MS VC++ often defaults to
|
||||
this for the release
|
||||
version of a new project.
|
||||
Debug Single Threaded /MLd - MS VC++ often defaults to
|
||||
this for the debug version
|
||||
of a new project.
|
||||
Multithreaded /MT
|
||||
Debug Multithreaded /MTd
|
||||
Multithreaded DLL /MD - OpenSSL defaults to this.
|
||||
Debug Multithreaded DLL /MDd
|
||||
|
||||
Note that debug and release libraries are NOT interchangeable. If you
|
||||
built OpenSSL with /MD your application must use /MD and cannot use /MDd.
|
||||
|
||||
|
||||
* How do I read or write a DER encoded buffer using the ASN1 functions?
|
||||
@ -523,44 +584,16 @@ OpenSSL_add_all_algorithms(). See the manual page for more information.
|
||||
|
||||
* Why can't the OpenSSH configure script detect OpenSSL?
|
||||
|
||||
There is a problem with OpenSSH 1.2.2p1, in that the configure script
|
||||
can't find the installed OpenSSL libraries. The problem is actually
|
||||
a small glitch that is easily solved with the following patch to be
|
||||
applied to the OpenSSH distribution:
|
||||
|
||||
----- snip:start -----
|
||||
--- openssh-1.2.2p1/configure.in.orig Thu Mar 23 18:56:58 2000
|
||||
+++ openssh-1.2.2p1/configure.in Thu Mar 23 18:55:05 2000
|
||||
@@ -152,10 +152,10 @@
|
||||
AC_MSG_CHECKING([for OpenSSL/SSLeay directory])
|
||||
for ssldir in "" $tryssldir /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
|
||||
if test ! -z "$ssldir" ; then
|
||||
- LIBS="$saved_LIBS -L$ssldir"
|
||||
+ LIBS="$saved_LIBS -L$ssldir/lib"
|
||||
CFLAGS="$CFLAGS -I$ssldir/include"
|
||||
if test "x$need_dash_r" = "x1" ; then
|
||||
- LIBS="$LIBS -R$ssldir"
|
||||
+ LIBS="$LIBS -R$ssldir/lib"
|
||||
fi
|
||||
fi
|
||||
LIBS="$LIBS -lcrypto"
|
||||
--- openssh-1.2.2p1/configure.orig Thu Mar 23 18:55:02 2000
|
||||
+++ openssh-1.2.2p1/configure Thu Mar 23 18:57:08 2000
|
||||
@@ -1890,10 +1890,10 @@
|
||||
echo "configure:1891: checking for OpenSSL/SSLeay directory" >&5
|
||||
for ssldir in "" $tryssldir /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
|
||||
if test ! -z "$ssldir" ; then
|
||||
- LIBS="$saved_LIBS -L$ssldir"
|
||||
+ LIBS="$saved_LIBS -L$ssldir/lib"
|
||||
CFLAGS="$CFLAGS -I$ssldir/include"
|
||||
if test "x$need_dash_r" = "x1" ; then
|
||||
- LIBS="$LIBS -R$ssldir"
|
||||
+ LIBS="$LIBS -R$ssldir/lib"
|
||||
fi
|
||||
fi
|
||||
LIBS="$LIBS -lcrypto"
|
||||
----- snip:end -----
|
||||
Several reasons for problems with the automatic detection exist.
|
||||
OpenSSH requires at least version 0.9.5a of the OpenSSL libraries.
|
||||
Sometimes the distribution has installed an older version in the system
|
||||
locations that is detected instead of a new one installed. The OpenSSL
|
||||
library might have been compiled for another CPU or another mode (32/64 bits).
|
||||
Permissions might be wrong.
|
||||
|
||||
The general answer is to check the config.log file generated when running
|
||||
the OpenSSH configure script. It should contain the detailed information
|
||||
on why the OpenSSL library was not detected or considered incompatible.
|
||||
|
||||
* Can I use OpenSSL's SSL library with non-blocking I/O?
|
||||
|
||||
@ -579,7 +612,7 @@ SSL_write() will try to continue any pending handshake.
|
||||
* Why doesn't my server application receive a client certificate?
|
||||
|
||||
Due to the TLS protocol definition, a client will only send a certificate,
|
||||
if explicitely asked by the server. Use the SSL_VERIFY_PEER flag of the
|
||||
if explicitly asked by the server. Use the SSL_VERIFY_PEER flag of the
|
||||
SSL_CTX_set_verify() function to enable the use of client certificates.
|
||||
|
||||
|
||||
|
4
crypto/dist/openssl/apps/dgst.c
vendored
4
crypto/dist/openssl/apps/dgst.c
vendored
@ -87,8 +87,8 @@ int MAIN(int argc, char **argv)
|
||||
BIO *bmd=NULL;
|
||||
BIO *out = NULL;
|
||||
const char *name;
|
||||
#define PROG_NAME_SIZE 16
|
||||
char pname[PROG_NAME_SIZE];
|
||||
#define PROG_NAME_SIZE 39
|
||||
char pname[PROG_NAME_SIZE+1];
|
||||
int separator=0;
|
||||
int debug=0;
|
||||
const char *outfile = NULL, *keyfile = NULL;
|
||||
|
22
crypto/dist/openssl/apps/s_time.c
vendored
22
crypto/dist/openssl/apps/s_time.c
vendored
@ -82,7 +82,7 @@
|
||||
#include "wintext.h"
|
||||
#endif
|
||||
|
||||
#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
|
||||
#if !defined(MSDOS) && !defined(VXWORKS) && (!defined(VMS) || defined(__DECC)) || defined (_DARWIN)
|
||||
#define TIMES
|
||||
#endif
|
||||
|
||||
@ -102,7 +102,7 @@
|
||||
#undef TIMES
|
||||
#endif
|
||||
|
||||
#ifndef TIMES
|
||||
#if !defined(TIMES) && !defined(VXWORKS)
|
||||
#include <sys/timeb.h>
|
||||
#endif
|
||||
|
||||
@ -139,6 +139,8 @@
|
||||
#undef BUFSIZZ
|
||||
#define BUFSIZZ 1024*10
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
@ -368,6 +370,22 @@ static double tm_Time_F(int s)
|
||||
ret=((double)(tend.tms_utime-tstart.tms_utime))/HZ;
|
||||
return((ret == 0.0)?1e-6:ret);
|
||||
}
|
||||
#elif defined(VXWORKS)
|
||||
{
|
||||
static unsigned long tick_start, tick_end;
|
||||
|
||||
if( s == START )
|
||||
{
|
||||
tick_start = tickGet();
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
tick_end = tickGet();
|
||||
ret = (double)(tick_end - tick_start) / (double)sysClkRateGet();
|
||||
return((ret == 0.0)?1e-6:ret);
|
||||
}
|
||||
}
|
||||
#else /* !times() */
|
||||
static struct timeb tstart,tend;
|
||||
long i;
|
||||
|
9
crypto/dist/openssl/apps/smime.c
vendored
9
crypto/dist/openssl/apps/smime.c
vendored
@ -414,7 +414,10 @@ int MAIN(int argc, char **argv)
|
||||
p7 = PKCS7_encrypt(encerts, in, cipher, flags);
|
||||
} else if(operation == SMIME_SIGN) {
|
||||
p7 = PKCS7_sign(signer, key, other, in, flags);
|
||||
BIO_reset(in);
|
||||
if (BIO_reset(in) != 0 && (flags & PKCS7_DETACHED)) {
|
||||
BIO_printf(bio_err, "Can't rewind input file\n");
|
||||
goto end;
|
||||
}
|
||||
} else {
|
||||
if(informat == FORMAT_SMIME)
|
||||
p7 = SMIME_read_PKCS7(in, &indata);
|
||||
@ -454,9 +457,9 @@ int MAIN(int argc, char **argv)
|
||||
} else if(operation == SMIME_VERIFY) {
|
||||
STACK_OF(X509) *signers;
|
||||
if(PKCS7_verify(p7, other, store, indata, out, flags)) {
|
||||
BIO_printf(bio_err, "Verification Successful\n");
|
||||
BIO_printf(bio_err, "Verification successful\n");
|
||||
} else {
|
||||
BIO_printf(bio_err, "Verification Failure\n");
|
||||
BIO_printf(bio_err, "Verification failure\n");
|
||||
goto end;
|
||||
}
|
||||
signers = PKCS7_get0_signers(p7, other, flags);
|
||||
|
4
crypto/dist/openssl/crypto/asn1/a_strnid.c
vendored
4
crypto/dist/openssl/crypto/asn1/a_strnid.c
vendored
@ -105,9 +105,9 @@ int ASN1_STRING_set_default_mask_asc(char *p)
|
||||
mask = strtoul(p + 5, &end, 0);
|
||||
if(*end) return 0;
|
||||
} else if(!strcmp(p, "nombstr"))
|
||||
mask = ~(B_ASN1_BMPSTRING|B_ASN1_UTF8STRING);
|
||||
mask = ~((unsigned long)(B_ASN1_BMPSTRING|B_ASN1_UTF8STRING));
|
||||
else if(!strcmp(p, "pkix"))
|
||||
mask = ~B_ASN1_T61STRING;
|
||||
mask = ~((unsigned long)B_ASN1_T61STRING);
|
||||
else if(!strcmp(p, "utf8only")) mask = B_ASN1_UTF8STRING;
|
||||
else if(!strcmp(p, "default"))
|
||||
mask = 0xFFFFFFFFL;
|
||||
|
4
crypto/dist/openssl/crypto/asn1/asn1.h
vendored
4
crypto/dist/openssl/crypto/asn1/asn1.h
vendored
@ -805,8 +805,6 @@ void ASN1_HEADER_free(ASN1_HEADER *a);
|
||||
|
||||
int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);
|
||||
|
||||
void ERR_load_ASN1_strings(void);
|
||||
|
||||
/* Not used that much at this point, except for the first two */
|
||||
ASN1_METHOD *X509_asn1_meth(void);
|
||||
ASN1_METHOD *RSAPrivateKey_asn1_meth(void);
|
||||
@ -848,6 +846,7 @@ void ASN1_STRING_TABLE_cleanup(void);
|
||||
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
||||
* made after this point may be overwritten when the script is next run.
|
||||
*/
|
||||
void ERR_load_ASN1_strings(void);
|
||||
|
||||
/* Error codes for the ASN1 functions. */
|
||||
|
||||
@ -1119,4 +1118,3 @@ void ASN1_STRING_TABLE_cleanup(void);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
10
crypto/dist/openssl/crypto/bio/bio.h
vendored
10
crypto/dist/openssl/crypto/bio/bio.h
vendored
@ -354,8 +354,8 @@ typedef struct bio_f_buffer_ctx_struct
|
||||
#define BIO_set_conn_int_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,3,(char *)port)
|
||||
#define BIO_get_conn_hostname(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0)
|
||||
#define BIO_get_conn_port(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1)
|
||||
#define BIO_get_conn_ip(b,ip) BIO_ptr_ctrl(b,BIO_C_SET_CONNECT,2)
|
||||
#define BIO_get_conn_int_port(b,port) BIO_int_ctrl(b,BIO_C_SET_CONNECT,3,port)
|
||||
#define BIO_get_conn_ip(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,2)
|
||||
#define BIO_get_conn_int_port(b) BIO_int_ctrl(b,BIO_C_GET_CONNECT,3)
|
||||
|
||||
|
||||
#define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL)
|
||||
@ -429,7 +429,7 @@ int BIO_read_filename(BIO *b,const char *name);
|
||||
#define BIO_set_ssl_renegotiate_bytes(b,num) \
|
||||
BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_BYTES,num,NULL);
|
||||
#define BIO_get_num_renegotiates(b) \
|
||||
BIO_ctrl(b,BIO_C_SET_SSL_NUM_RENEGOTIATES,0,NULL);
|
||||
BIO_ctrl(b,BIO_C_GET_SSL_NUM_RENEGOTIATES,0,NULL);
|
||||
#define BIO_set_ssl_renegotiate_timeout(b,seconds) \
|
||||
BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT,seconds,NULL);
|
||||
|
||||
@ -584,8 +584,6 @@ int BIO_sock_init(void );
|
||||
void BIO_sock_cleanup(void);
|
||||
int BIO_set_tcp_ndelay(int sock,int turn_on);
|
||||
|
||||
void ERR_load_BIO_strings(void );
|
||||
|
||||
BIO *BIO_new_socket(int sock, int close_flag);
|
||||
BIO *BIO_new_fd(int fd, int close_flag);
|
||||
BIO *BIO_new_connect(char *host_port);
|
||||
@ -611,6 +609,7 @@ int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args);
|
||||
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
||||
* made after this point may be overwritten when the script is next run.
|
||||
*/
|
||||
void ERR_load_BIO_strings(void);
|
||||
|
||||
/* Error codes for the BIO functions. */
|
||||
|
||||
@ -680,4 +679,3 @@ int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
2
crypto/dist/openssl/crypto/bio/bss_log.c
vendored
2
crypto/dist/openssl/crypto/bio/bss_log.c
vendored
@ -75,7 +75,7 @@
|
||||
# include <starlet.h>
|
||||
#elif defined(__ultrix)
|
||||
# include <sys/syslog.h>
|
||||
#elif !defined(MSDOS) /* Unix */
|
||||
#elif !defined(MSDOS) && !defined(VXWORKS) /* Unix */
|
||||
# include <syslog.h>
|
||||
#endif
|
||||
|
||||
|
21
crypto/dist/openssl/crypto/bn/bn.h
vendored
21
crypto/dist/openssl/crypto/bn/bn.h
vendored
@ -78,6 +78,23 @@ extern "C" {
|
||||
#define RECP_MUL_MOD
|
||||
#define MONT_MUL_MOD
|
||||
|
||||
/* This next option uses the C libraries (2 word)/(1 word) function.
|
||||
* If it is not defined, I use my C version (which is slower).
|
||||
* The reason for this flag is that when the particular C compiler
|
||||
* library routine is used, and the library is linked with a different
|
||||
* compiler, the library is missing. This mostly happens when the
|
||||
* library is built with gcc and then linked using normal cc. This would
|
||||
* be a common occurrence because gcc normally produces code that is
|
||||
* 2 times faster than system compilers for the big number stuff.
|
||||
* For machines with only one compiler (or shared libraries), this should
|
||||
* be on. Again this in only really a problem on machines
|
||||
* using "long long's", are 32bit, and are not using my assembler code. */
|
||||
#if defined(MSDOS) || defined(WINDOWS) || defined(WIN32) || defined(linux)
|
||||
# ifndef BN_DIV2W
|
||||
# define BN_DIV2W
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define BN_ULLONG u_int64_t
|
||||
#define BN_ULONG u_int32_t
|
||||
#define BN_LONG int32_t
|
||||
@ -215,6 +232,7 @@ void BN_CTX_end(BN_CTX *ctx);
|
||||
int BN_rand(BIGNUM *rnd, int bits, int top,int bottom);
|
||||
int BN_pseudo_rand(BIGNUM *rnd, int bits, int top,int bottom);
|
||||
int BN_rand_range(BIGNUM *rnd, BIGNUM *range);
|
||||
int BN_pseudo_rand_range(BIGNUM *rnd, BIGNUM *range);
|
||||
int BN_num_bits(const BIGNUM *a);
|
||||
int BN_num_bits_word(BN_ULONG);
|
||||
BIGNUM *BN_new(void);
|
||||
@ -287,7 +305,6 @@ int BN_is_prime(const BIGNUM *p,int nchecks,
|
||||
int BN_is_prime_fasttest(const BIGNUM *p,int nchecks,
|
||||
void (*callback)(int,int,void *),BN_CTX *ctx,void *cb_arg,
|
||||
int do_trial_division);
|
||||
void ERR_load_BN_strings(void );
|
||||
|
||||
BN_MONT_CTX *BN_MONT_CTX_new(void );
|
||||
void BN_MONT_CTX_init(BN_MONT_CTX *ctx);
|
||||
@ -358,6 +375,7 @@ int BN_bntest_rand(BIGNUM *rnd, int bits, int top,int bottom);
|
||||
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
||||
* made after this point may be overwritten when the script is next run.
|
||||
*/
|
||||
void ERR_load_BN_strings(void);
|
||||
|
||||
/* Error codes for the BN functions. */
|
||||
|
||||
@ -401,4 +419,3 @@ int BN_bntest_rand(BIGNUM *rnd, int bits, int top,int bottom);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
22
crypto/dist/openssl/crypto/conf/conf.h
vendored
22
crypto/dist/openssl/crypto/conf/conf.h
vendored
@ -56,14 +56,13 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
#ifndef HEADER_CONF_H
|
||||
#ifndef HEADER_CONF_H
|
||||
#define HEADER_CONF_H
|
||||
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/lhash.h>
|
||||
#include <openssl/stack.h>
|
||||
#include <openssl/safestack.h>
|
||||
#include <openssl/e_os.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -86,14 +85,14 @@ typedef struct conf_method_st CONF_METHOD;
|
||||
struct conf_method_st
|
||||
{
|
||||
const char *name;
|
||||
CONF *(MS_FAR *create)(CONF_METHOD *meth);
|
||||
int (MS_FAR *init)(CONF *conf);
|
||||
int (MS_FAR *destroy)(CONF *conf);
|
||||
int (MS_FAR *destroy_data)(CONF *conf);
|
||||
int (MS_FAR *load)(CONF *conf, BIO *bp, long *eline);
|
||||
int (MS_FAR *dump)(CONF *conf, BIO *bp);
|
||||
int (MS_FAR *is_number)(CONF *conf, char c);
|
||||
int (MS_FAR *to_int)(CONF *conf, char c);
|
||||
CONF *(*create)(CONF_METHOD *meth);
|
||||
int (*init)(CONF *conf);
|
||||
int (*destroy)(CONF *conf);
|
||||
int (*destroy_data)(CONF *conf);
|
||||
int (*load)(CONF *conf, BIO *bp, long *eline);
|
||||
int (*dump)(CONF *conf, BIO *bp);
|
||||
int (*is_number)(CONF *conf, char c);
|
||||
int (*to_int)(CONF *conf, char c);
|
||||
};
|
||||
|
||||
int CONF_set_default_method(CONF_METHOD *meth);
|
||||
@ -106,7 +105,6 @@ long CONF_get_number(LHASH *conf,char *group,char *name);
|
||||
void CONF_free(LHASH *conf);
|
||||
int CONF_dump_fp(LHASH *conf, FILE *out);
|
||||
int CONF_dump_bio(LHASH *conf, BIO *out);
|
||||
void ERR_load_CONF_strings(void );
|
||||
|
||||
/* New conf code. The semantics are different from the functions above.
|
||||
If that wasn't the case, the above functions would have been replaced */
|
||||
@ -141,6 +139,7 @@ int NCONF_dump_bio(CONF *conf, BIO *out);
|
||||
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
||||
* made after this point may be overwritten when the script is next run.
|
||||
*/
|
||||
void ERR_load_CONF_strings(void);
|
||||
|
||||
/* Error codes for the CONF functions. */
|
||||
|
||||
@ -172,4 +171,3 @@ int NCONF_dump_bio(CONF *conf, BIO *out);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
40
crypto/dist/openssl/crypto/crypto.h
vendored
40
crypto/dist/openssl/crypto/crypto.h
vendored
@ -110,17 +110,18 @@ extern "C" {
|
||||
#define CRYPTO_LOCK_SSL_SESS_CERT 15
|
||||
#define CRYPTO_LOCK_SSL 16
|
||||
#define CRYPTO_LOCK_RAND 17
|
||||
#define CRYPTO_LOCK_MALLOC 18
|
||||
#define CRYPTO_LOCK_BIO 19
|
||||
#define CRYPTO_LOCK_GETHOSTBYNAME 20
|
||||
#define CRYPTO_LOCK_GETSERVBYNAME 21
|
||||
#define CRYPTO_LOCK_READDIR 22
|
||||
#define CRYPTO_LOCK_RSA_BLINDING 23
|
||||
#define CRYPTO_LOCK_DH 24
|
||||
#define CRYPTO_LOCK_MALLOC2 25
|
||||
#define CRYPTO_LOCK_DSO 26
|
||||
#define CRYPTO_LOCK_DYNLOCK 27
|
||||
#define CRYPTO_NUM_LOCKS 28
|
||||
#define CRYPTO_LOCK_RAND2 18
|
||||
#define CRYPTO_LOCK_MALLOC 19
|
||||
#define CRYPTO_LOCK_BIO 20
|
||||
#define CRYPTO_LOCK_GETHOSTBYNAME 21
|
||||
#define CRYPTO_LOCK_GETSERVBYNAME 22
|
||||
#define CRYPTO_LOCK_READDIR 23
|
||||
#define CRYPTO_LOCK_RSA_BLINDING 24
|
||||
#define CRYPTO_LOCK_DH 25
|
||||
#define CRYPTO_LOCK_MALLOC2 26
|
||||
#define CRYPTO_LOCK_DSO 27
|
||||
#define CRYPTO_LOCK_DYNLOCK 28
|
||||
#define CRYPTO_NUM_LOCKS 29
|
||||
|
||||
#define CRYPTO_LOCK 1
|
||||
#define CRYPTO_UNLOCK 2
|
||||
@ -340,6 +341,9 @@ int CRYPTO_push_info_(const char *info, const char *file, int line);
|
||||
int CRYPTO_pop_info(void);
|
||||
int CRYPTO_remove_all_info(void);
|
||||
|
||||
|
||||
/* Default debugging functions (enabled by CRYPTO_malloc_debug_init() macro;
|
||||
* used as default in CRYPTO_MDEBUG compilations): */
|
||||
/* The last argument has the following significance:
|
||||
*
|
||||
* 0: called before the actual memory allocation has taken place
|
||||
@ -348,29 +352,28 @@ int CRYPTO_remove_all_info(void);
|
||||
void CRYPTO_dbg_malloc(void *addr,int num,const char *file,int line,int before_p);
|
||||
void CRYPTO_dbg_realloc(void *addr1,void *addr2,int num,const char *file,int line,int before_p);
|
||||
void CRYPTO_dbg_free(void *addr,int before_p);
|
||||
|
||||
/* Tell the debugging code about options. By default, the following values
|
||||
* apply:
|
||||
*
|
||||
* 0: Clear all options.
|
||||
* 1: Set the "Show Time" option.
|
||||
* 2: Set the "Show Thread Number" option.
|
||||
* 3: 1 + 2
|
||||
* 0: Clear all options.
|
||||
* V_CRYPTO_MDEBUG_TIME (1): Set the "Show Time" option.
|
||||
* V_CRYPTO_MDEBUG_THREAD (2): Set the "Show Thread Number" option.
|
||||
* V_CRYPTO_MDEBUG_ALL (3): 1 + 2
|
||||
*/
|
||||
void CRYPTO_dbg_set_options(long bits);
|
||||
long CRYPTO_dbg_get_options(void);
|
||||
|
||||
|
||||
void CRYPTO_mem_leaks_fp(FILE *);
|
||||
void CRYPTO_mem_leaks(struct bio_st *bio);
|
||||
/* unsigned long order, char *file, int line, int num_bytes, char *addr */
|
||||
void CRYPTO_mem_leaks_cb(void (*cb)(unsigned long, const char *, int, int, void *));
|
||||
|
||||
void ERR_load_CRYPTO_strings(void);
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
||||
* made after this point may be overwritten when the script is next run.
|
||||
*/
|
||||
void ERR_load_CRYPTO_strings(void);
|
||||
|
||||
/* Error codes for the CRYPTO functions. */
|
||||
|
||||
@ -387,4 +390,3 @@ void ERR_load_CRYPTO_strings(void);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
1
crypto/dist/openssl/crypto/des/des.h
vendored
1
crypto/dist/openssl/crypto/des/des.h
vendored
@ -59,6 +59,7 @@
|
||||
#ifndef HEADER_DES_H
|
||||
#define HEADER_DES_H
|
||||
|
||||
|
||||
#ifdef _KERBEROS_DES_H
|
||||
#error <openssl/des.h> replaces <kerberos/des.h>.
|
||||
#endif
|
||||
|
2
crypto/dist/openssl/crypto/des/fcrypt.c
vendored
2
crypto/dist/openssl/crypto/des/fcrypt.c
vendored
@ -61,7 +61,7 @@ static unsigned const char cov_2char[64]={
|
||||
void fcrypt_body(DES_LONG *out,des_key_schedule ks,
|
||||
DES_LONG Eswap0, DES_LONG Eswap1);
|
||||
|
||||
#if !defined(PERL5) && !defined(__FreeBSD__) && !defined(NeXT)
|
||||
#if !defined(PERL5) && !defined(__FreeBSD__) && !defined(NeXT) && !defined(_DARWIN)
|
||||
char *crypt(const char *buf, const char *salt)
|
||||
{
|
||||
return(des_crypt(buf, salt));
|
||||
|
5
crypto/dist/openssl/crypto/dh/dh.h
vendored
5
crypto/dist/openssl/crypto/dh/dh.h
vendored
@ -59,6 +59,7 @@
|
||||
#ifndef HEADER_DH_H
|
||||
#define HEADER_DH_H
|
||||
|
||||
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/crypto.h>
|
||||
@ -165,12 +166,12 @@ DH * d2i_DHparams(DH **a,unsigned char **pp, long length);
|
||||
int i2d_DHparams(DH *a,unsigned char **pp);
|
||||
int DHparams_print_fp(FILE *fp, DH *x);
|
||||
int DHparams_print(BIO *bp, DH *x);
|
||||
void ERR_load_DH_strings(void );
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
||||
* made after this point may be overwritten when the script is next run.
|
||||
*/
|
||||
void ERR_load_DH_strings(void);
|
||||
|
||||
/* Error codes for the DH functions. */
|
||||
|
||||
@ -183,10 +184,10 @@ void ERR_load_DH_strings(void );
|
||||
#define DH_F_DH_NEW 105
|
||||
|
||||
/* Reason codes. */
|
||||
#define DH_R_BAD_GENERATOR 101
|
||||
#define DH_R_NO_PRIVATE_VALUE 100
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
5
crypto/dist/openssl/crypto/dsa/dsa.h
vendored
5
crypto/dist/openssl/crypto/dsa/dsa.h
vendored
@ -65,6 +65,7 @@
|
||||
#ifndef HEADER_DSA_H
|
||||
#define HEADER_DSA_H
|
||||
|
||||
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/crypto.h>
|
||||
@ -170,8 +171,6 @@ int DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
|
||||
int DSA_set_ex_data(DSA *d, int idx, void *arg);
|
||||
void *DSA_get_ex_data(DSA *d, int idx);
|
||||
|
||||
void ERR_load_DSA_strings(void );
|
||||
|
||||
DSA * d2i_DSAPublicKey(DSA **a, unsigned char **pp, long length);
|
||||
DSA * d2i_DSAPrivateKey(DSA **a, unsigned char **pp, long length);
|
||||
DSA * d2i_DSAparams(DSA **a, unsigned char **pp, long length);
|
||||
@ -202,6 +201,7 @@ DH *DSA_dup_DH(DSA *r);
|
||||
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
||||
* made after this point may be overwritten when the script is next run.
|
||||
*/
|
||||
void ERR_load_DSA_strings(void);
|
||||
|
||||
/* Error codes for the DSA functions. */
|
||||
|
||||
@ -228,4 +228,3 @@ DH *DSA_dup_DH(DSA *r);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
4
crypto/dist/openssl/crypto/err/err.c
vendored
4
crypto/dist/openssl/crypto/err/err.c
vendored
@ -784,8 +784,7 @@ void ERR_add_error_data(int num, ...)
|
||||
if (p == NULL)
|
||||
{
|
||||
OPENSSL_free(str);
|
||||
va_end(args);
|
||||
return;
|
||||
goto err;
|
||||
}
|
||||
else
|
||||
str=p;
|
||||
@ -795,6 +794,7 @@ void ERR_add_error_data(int num, ...)
|
||||
}
|
||||
ERR_set_error_data(str,ERR_TXT_MALLOCED|ERR_TXT_STRING);
|
||||
|
||||
err:
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
|
3
crypto/dist/openssl/crypto/err/err.h
vendored
3
crypto/dist/openssl/crypto/err/err.h
vendored
@ -122,6 +122,7 @@ typedef struct err_state_st
|
||||
#define ERR_LIB_PKCS12 35
|
||||
#define ERR_LIB_RAND 36
|
||||
#define ERR_LIB_DSO 37
|
||||
#define ERR_LIB_COMP 41
|
||||
|
||||
#define ERR_LIB_USER 128
|
||||
|
||||
@ -151,6 +152,7 @@ typedef struct err_state_st
|
||||
#define PKCS12err(f,r) ERR_PUT_error(ERR_LIB_PKCS12,(f),(r),ERR_file_name,__LINE__)
|
||||
#define RANDerr(f,r) ERR_PUT_error(ERR_LIB_RAND,(f),(r),ERR_file_name,__LINE__)
|
||||
#define DSOerr(f,r) ERR_PUT_error(ERR_LIB_DSO,(f),(r),ERR_file_name,__LINE__)
|
||||
#define COMPerr(f,r) ERR_PUT_error(ERR_LIB_COMP,(f),(r),ERR_file_name,__LINE__)
|
||||
|
||||
/* Borland C seems too stupid to be able to shift and do longs in
|
||||
* the pre-processor :-( */
|
||||
@ -200,6 +202,7 @@ typedef struct err_state_st
|
||||
#define ERR_R_PKCS7_LIB ERR_LIB_PKCS7
|
||||
#define ERR_R_PKCS12_LIB ERR_LIB_PKCS12
|
||||
#define ERR_R_DSO_LIB ERR_LIB_DSO
|
||||
#define ERR_R_COMP_LIB ERR_LIB_COMP
|
||||
|
||||
/* fatal error */
|
||||
#define ERR_R_MALLOC_FAILURE (1|ERR_R_FATAL)
|
||||
|
6
crypto/dist/openssl/crypto/evp/evp.h
vendored
6
crypto/dist/openssl/crypto/evp/evp.h
vendored
@ -418,7 +418,7 @@ typedef int (EVP_PBE_KEYGEN)(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
|
||||
#define EVP_CIPHER_key_length(e) ((e)->key_len)
|
||||
#define EVP_CIPHER_iv_length(e) ((e)->iv_len)
|
||||
#define EVP_CIPHER_flags(e) ((e)->flags)
|
||||
#define EVP_CIPHER_mode(e) ((e)->flags) & EVP_CIPH_MODE)
|
||||
#define EVP_CIPHER_mode(e) (((e)->flags) & EVP_CIPH_MODE)
|
||||
|
||||
#define EVP_CIPHER_CTX_cipher(e) ((e)->cipher)
|
||||
#define EVP_CIPHER_CTX_nid(e) ((e)->cipher->nid)
|
||||
@ -522,8 +522,6 @@ int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned
|
||||
char *out, int *outl);
|
||||
int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
|
||||
|
||||
void ERR_load_EVP_strings(void );
|
||||
|
||||
void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a);
|
||||
int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a);
|
||||
int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen);
|
||||
@ -662,6 +660,7 @@ void EVP_PBE_cleanup(void);
|
||||
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
||||
* made after this point may be overwritten when the script is next run.
|
||||
*/
|
||||
void ERR_load_EVP_strings(void);
|
||||
|
||||
/* Error codes for the EVP functions. */
|
||||
|
||||
@ -734,4 +733,3 @@ void EVP_PBE_cleanup(void);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
1
crypto/dist/openssl/crypto/hmac/hmac.h
vendored
1
crypto/dist/openssl/crypto/hmac/hmac.h
vendored
@ -58,6 +58,7 @@
|
||||
#ifndef HEADER_HMAC_H
|
||||
#define HEADER_HMAC_H
|
||||
|
||||
|
||||
#include <openssl/evp.h>
|
||||
|
||||
#define HMAC_MAX_MD_CBLOCK 64
|
||||
|
4
crypto/dist/openssl/crypto/md32_common.h
vendored
4
crypto/dist/openssl/crypto/md32_common.h
vendored
@ -197,7 +197,7 @@
|
||||
*
|
||||
* <appro@fy.chalmers.se>
|
||||
*/
|
||||
# if defined(__i386)
|
||||
# if defined(__i386) || defined(__i386__)
|
||||
# define ROTATE(a,n) ({ register unsigned int ret; \
|
||||
asm ( \
|
||||
"roll %1,%0" \
|
||||
@ -223,7 +223,7 @@
|
||||
*/
|
||||
# if defined(__GNUC__) && __GNUC__>=2 && !defined(NO_ASM) && !defined(NO_INLINE_ASM)
|
||||
/* some GNU C inline assembler templates by <appro@fy.chalmers.se> */
|
||||
# if defined(__i386) && !defined(I386_ONLY)
|
||||
# if (defined(__i386) || defined(__i386__)) && !defined(I386_ONLY)
|
||||
# define BE_FETCH32(a) ({ register unsigned int l=(a);\
|
||||
asm ( \
|
||||
"bswapl %0" \
|
||||
|
1
crypto/dist/openssl/crypto/md4/md4.h
vendored
1
crypto/dist/openssl/crypto/md4/md4.h
vendored
@ -63,6 +63,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
* ! MD4_LONG has to be at least 32 bits wide. If it's wider, then !
|
||||
|
2
crypto/dist/openssl/crypto/md4/md4_locl.h
vendored
2
crypto/dist/openssl/crypto/md4/md4_locl.h
vendored
@ -66,7 +66,7 @@
|
||||
void md4_block_host_order (MD4_CTX *c, const void *p,int num);
|
||||
void md4_block_data_order (MD4_CTX *c, const void *p,int num);
|
||||
|
||||
#if defined(__i386) || defined(_M_IX86) || defined(__INTEL__)
|
||||
#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__)
|
||||
/*
|
||||
* *_block_host_order is expected to handle aligned data while
|
||||
* *_block_data_order - unaligned. As algorithm and host (x86)
|
||||
|
4
crypto/dist/openssl/crypto/md5/md5_locl.h
vendored
4
crypto/dist/openssl/crypto/md5/md5_locl.h
vendored
@ -65,7 +65,7 @@
|
||||
#define MD5_LONG_LOG2 2
|
||||
|
||||
#ifdef MD5_ASM
|
||||
# if defined(__i386) || defined(_M_IX86) || defined(__INTEL__)
|
||||
# if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__)
|
||||
# define md5_block_host_order md5_block_asm_host_order
|
||||
# elif defined(__sparc) && defined(ULTRASPARC)
|
||||
void md5_block_asm_data_order_aligned (MD5_CTX *c, const MD5_LONG *p,int num);
|
||||
@ -76,7 +76,7 @@
|
||||
void md5_block_host_order (MD5_CTX *c, const void *p,int num);
|
||||
void md5_block_data_order (MD5_CTX *c, const void *p,int num);
|
||||
|
||||
#if defined(__i386) || defined(_M_IX86) || defined(__INTEL__)
|
||||
#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__)
|
||||
/*
|
||||
* *_block_host_order is expected to handle aligned data while
|
||||
* *_block_data_order - unaligned. As algorithm and host (x86)
|
||||
|
1
crypto/dist/openssl/crypto/mdc2/mdc2.h
vendored
1
crypto/dist/openssl/crypto/mdc2/mdc2.h
vendored
@ -65,6 +65,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#define MDC2_BLOCK 8
|
||||
#define MDC2_DIGEST_LENGTH 16
|
||||
|
||||
|
4
crypto/dist/openssl/crypto/pem/pem.h
vendored
4
crypto/dist/openssl/crypto/pem/pem.h
vendored
@ -498,8 +498,6 @@ void PEM_SignUpdate(EVP_MD_CTX *ctx,unsigned char *d,unsigned int cnt);
|
||||
int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret,
|
||||
unsigned int *siglen, EVP_PKEY *pkey);
|
||||
|
||||
void ERR_load_PEM_strings(void);
|
||||
|
||||
void PEM_proc_type(char *buf, int type);
|
||||
void PEM_dek_info(char *buf, const char *type, int len, char *str);
|
||||
|
||||
@ -582,6 +580,7 @@ int PEM_write_PKCS8PrivateKey(FILE *fp,EVP_PKEY *x,const EVP_CIPHER *enc,
|
||||
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
||||
* made after this point may be overwritten when the script is next run.
|
||||
*/
|
||||
void ERR_load_PEM_strings(void);
|
||||
|
||||
/* Error codes for the PEM functions. */
|
||||
|
||||
@ -632,4 +631,3 @@ int PEM_write_PKCS8PrivateKey(FILE *fp,EVP_PKEY *x,const EVP_CIPHER *enc,
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
60
crypto/dist/openssl/crypto/pkcs7/pk7_attr.c
vendored
60
crypto/dist/openssl/crypto/pkcs7/pk7_attr.c
vendored
@ -1,9 +1,59 @@
|
||||
/* pk7_attr.c */
|
||||
/* S/MIME code.
|
||||
* Copyright (C) 1997-8 Dr S N Henson (shenson@bigfoot.com)
|
||||
* All Rights Reserved.
|
||||
* Redistribution of this code without the authors permission is expressly
|
||||
* prohibited.
|
||||
/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
|
||||
* project 2001.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 2001 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* licensing@OpenSSL.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
4
crypto/dist/openssl/crypto/pkcs7/pkcs7.h
vendored
4
crypto/dist/openssl/crypto/pkcs7/pkcs7.h
vendored
@ -351,8 +351,6 @@ int i2d_PKCS7(PKCS7 *a,
|
||||
PKCS7 *d2i_PKCS7(PKCS7 **a,
|
||||
unsigned char **pp,long length);
|
||||
|
||||
void ERR_load_PKCS7_strings(void);
|
||||
|
||||
|
||||
long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg);
|
||||
|
||||
@ -420,6 +418,7 @@ int SMIME_text(BIO *in, BIO *out);
|
||||
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
||||
* made after this point may be overwritten when the script is next run.
|
||||
*/
|
||||
void ERR_load_PKCS7_strings(void);
|
||||
|
||||
/* Error codes for the PKCS7 functions. */
|
||||
|
||||
@ -500,4 +499,3 @@ int SMIME_text(BIO *in, BIO *out);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
31
crypto/dist/openssl/crypto/rand/md_rand.c
vendored
31
crypto/dist/openssl/crypto/rand/md_rand.c
vendored
@ -56,7 +56,7 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -144,6 +144,7 @@ static int initialized=0;
|
||||
static unsigned int crypto_lock_rand = 0; /* may be set only when a thread
|
||||
* holds CRYPTO_LOCK_RAND
|
||||
* (to prevent double locking) */
|
||||
/* access to lockin_thread is synchronized by CRYPTO_LOCK_RAND2 */
|
||||
static unsigned long locking_thread = 0; /* valid iff crypto_lock_rand is set */
|
||||
|
||||
|
||||
@ -210,7 +211,14 @@ static void ssleay_rand_add(const void *buf, int num, double add)
|
||||
*/
|
||||
|
||||
/* check if we already have the lock */
|
||||
do_not_lock = crypto_lock_rand && (locking_thread == CRYPTO_thread_id());
|
||||
if (crypto_lock_rand)
|
||||
{
|
||||
CRYPTO_r_lock(CRYPTO_LOCK_RAND2);
|
||||
do_not_lock = (locking_thread == CRYPTO_thread_id());
|
||||
CRYPTO_r_unlock(CRYPTO_LOCK_RAND2);
|
||||
}
|
||||
else
|
||||
do_not_lock = 0;
|
||||
|
||||
if (!do_not_lock) CRYPTO_w_lock(CRYPTO_LOCK_RAND);
|
||||
st_idx=state_index;
|
||||
@ -361,8 +369,10 @@ static int ssleay_rand_bytes(unsigned char *buf, int num)
|
||||
CRYPTO_w_lock(CRYPTO_LOCK_RAND);
|
||||
|
||||
/* prevent ssleay_rand_bytes() from trying to obtain the lock again */
|
||||
crypto_lock_rand = 1;
|
||||
CRYPTO_w_lock(CRYPTO_LOCK_RAND2);
|
||||
locking_thread = CRYPTO_thread_id();
|
||||
CRYPTO_w_unlock(CRYPTO_LOCK_RAND2);
|
||||
crypto_lock_rand = 1;
|
||||
|
||||
if (!initialized)
|
||||
{
|
||||
@ -435,7 +445,6 @@ static int ssleay_rand_bytes(unsigned char *buf, int num)
|
||||
|
||||
/* before unlocking, we must clear 'crypto_lock_rand' */
|
||||
crypto_lock_rand = 0;
|
||||
locking_thread = 0;
|
||||
CRYPTO_w_unlock(CRYPTO_LOCK_RAND);
|
||||
|
||||
while (num > 0)
|
||||
@ -521,15 +530,24 @@ static int ssleay_rand_status(void)
|
||||
|
||||
/* check if we already have the lock
|
||||
* (could happen if a RAND_poll() implementation calls RAND_status()) */
|
||||
do_not_lock = crypto_lock_rand && (locking_thread == CRYPTO_thread_id());
|
||||
if (crypto_lock_rand)
|
||||
{
|
||||
CRYPTO_r_lock(CRYPTO_LOCK_RAND2);
|
||||
do_not_lock = (locking_thread == CRYPTO_thread_id());
|
||||
CRYPTO_r_unlock(CRYPTO_LOCK_RAND2);
|
||||
}
|
||||
else
|
||||
do_not_lock = 0;
|
||||
|
||||
if (!do_not_lock)
|
||||
{
|
||||
CRYPTO_w_lock(CRYPTO_LOCK_RAND);
|
||||
|
||||
/* prevent ssleay_rand_bytes() from trying to obtain the lock again */
|
||||
crypto_lock_rand = 1;
|
||||
CRYPTO_w_lock(CRYPTO_LOCK_RAND2);
|
||||
locking_thread = CRYPTO_thread_id();
|
||||
CRYPTO_w_unlock(CRYPTO_LOCK_RAND2);
|
||||
crypto_lock_rand = 1;
|
||||
}
|
||||
|
||||
if (!initialized)
|
||||
@ -544,7 +562,6 @@ static int ssleay_rand_status(void)
|
||||
{
|
||||
/* before unlocking, we must clear 'crypto_lock_rand' */
|
||||
crypto_lock_rand = 0;
|
||||
locking_thread = 0;
|
||||
|
||||
CRYPTO_w_unlock(CRYPTO_LOCK_RAND);
|
||||
}
|
||||
|
6
crypto/dist/openssl/crypto/rand/rand_egd.c
vendored
6
crypto/dist/openssl/crypto/rand/rand_egd.c
vendored
@ -75,7 +75,11 @@ int RAND_egd_bytes(const char *path,int bytes)
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#ifndef NO_SYS_UN_H
|
||||
#include <sys/un.h>
|
||||
# ifdef VXWORKS
|
||||
# include <streams/un.h>
|
||||
# else
|
||||
# include <sys/un.h>
|
||||
# endif
|
||||
#else
|
||||
struct sockaddr_un {
|
||||
short sun_family; /* AF_UNIX */
|
||||
|
4
crypto/dist/openssl/crypto/ripemd/rmd_locl.h
vendored
4
crypto/dist/openssl/crypto/ripemd/rmd_locl.h
vendored
@ -70,7 +70,7 @@
|
||||
* <appro@fy.chalmers.se>
|
||||
*/
|
||||
#ifdef RMD160_ASM
|
||||
# if defined(__i386) || defined(_M_IX86) || defined(__INTEL__)
|
||||
# if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__)
|
||||
# define ripemd160_block_host_order ripemd160_block_asm_host_order
|
||||
# endif
|
||||
#endif
|
||||
@ -78,7 +78,7 @@
|
||||
void ripemd160_block_host_order (RIPEMD160_CTX *c, const void *p,int num);
|
||||
void ripemd160_block_data_order (RIPEMD160_CTX *c, const void *p,int num);
|
||||
|
||||
#if defined(__i386) || defined(_M_IX86) || defined(__INTEL__)
|
||||
#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__)
|
||||
#define ripemd160_block_data_order ripemd160_block_host_order
|
||||
#endif
|
||||
|
||||
|
22
crypto/dist/openssl/crypto/rsa/rsa.h
vendored
22
crypto/dist/openssl/crypto/rsa/rsa.h
vendored
@ -96,9 +96,14 @@ typedef struct rsa_meth_st
|
||||
* compatibility this functionality is only enabled if the RSA_FLAG_SIGN_VER
|
||||
* option is set in 'flags'.
|
||||
*/
|
||||
int (*rsa_sign)(int type, unsigned char *m, unsigned int m_len,
|
||||
|
||||
/* changed m_len to m_length to avoid a conflict with a #define in
|
||||
vxworks for m_len for the mbuf code. This only shows up in apps
|
||||
that have USE_SOCKETS defined */
|
||||
|
||||
int (*rsa_sign)(int type, unsigned char *m, unsigned int m_length,
|
||||
unsigned char *sigret, unsigned int *siglen, RSA *rsa);
|
||||
int (*rsa_verify)(int dtype, unsigned char *m, unsigned int m_len,
|
||||
int (*rsa_verify)(int dtype, unsigned char *m, unsigned int m_length,
|
||||
unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
|
||||
|
||||
} RSA_METHOD;
|
||||
@ -197,8 +202,6 @@ RSA_METHOD *RSA_PKCS1_SSLeay(void);
|
||||
|
||||
RSA_METHOD *RSA_null_method(void);
|
||||
|
||||
void ERR_load_RSA_strings(void );
|
||||
|
||||
RSA * d2i_RSAPublicKey(RSA **a, unsigned char **pp, long length);
|
||||
int i2d_RSAPublicKey(RSA *a, unsigned char **pp);
|
||||
RSA * d2i_RSAPrivateKey(RSA **a, unsigned char **pp, long length);
|
||||
@ -219,16 +222,16 @@ RSA *d2i_Netscape_RSA_2(RSA **a, unsigned char **pp, long length, int (*cb)());
|
||||
|
||||
/* The following 2 functions sign and verify a X509_SIG ASN1 object
|
||||
* inside PKCS#1 padded RSA encryption */
|
||||
int RSA_sign(int type, unsigned char *m, unsigned int m_len,
|
||||
int RSA_sign(int type, unsigned char *m, unsigned int m_length,
|
||||
unsigned char *sigret, unsigned int *siglen, RSA *rsa);
|
||||
int RSA_verify(int type, unsigned char *m, unsigned int m_len,
|
||||
int RSA_verify(int type, unsigned char *m, unsigned int m_length,
|
||||
unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
|
||||
|
||||
/* The following 2 function sign and verify a ASN1_OCTET_STRING
|
||||
* object inside PKCS#1 padded RSA encryption */
|
||||
int RSA_sign_ASN1_OCTET_STRING(int type, unsigned char *m, unsigned int m_len,
|
||||
int RSA_sign_ASN1_OCTET_STRING(int type, unsigned char *m, unsigned int m_length,
|
||||
unsigned char *sigret, unsigned int *siglen, RSA *rsa);
|
||||
int RSA_verify_ASN1_OCTET_STRING(int type, unsigned char *m, unsigned int m_len,
|
||||
int RSA_verify_ASN1_OCTET_STRING(int type, unsigned char *m, unsigned int m_length,
|
||||
unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
|
||||
|
||||
int RSA_blinding_on(RSA *rsa, BN_CTX *ctx);
|
||||
@ -266,6 +269,7 @@ void *RSA_get_ex_data(RSA *r, int idx);
|
||||
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
||||
* made after this point may be overwritten when the script is next run.
|
||||
*/
|
||||
void ERR_load_RSA_strings(void);
|
||||
|
||||
/* Error codes for the RSA functions. */
|
||||
|
||||
@ -307,6 +311,7 @@ void *RSA_get_ex_data(RSA *r, int idx);
|
||||
#define RSA_R_DATA_GREATER_THAN_MOD_LEN 108
|
||||
#define RSA_R_DATA_TOO_LARGE 109
|
||||
#define RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 110
|
||||
#define RSA_R_DATA_TOO_LARGE_FOR_MODULUS 132
|
||||
#define RSA_R_DATA_TOO_SMALL 111
|
||||
#define RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE 122
|
||||
#define RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY 112
|
||||
@ -333,4 +338,3 @@ void *RSA_get_ex_data(RSA *r, int idx);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
2
crypto/dist/openssl/crypto/sha/sha_locl.h
vendored
2
crypto/dist/openssl/crypto/sha/sha_locl.h
vendored
@ -114,7 +114,7 @@
|
||||
# endif
|
||||
|
||||
# ifdef SHA1_ASM
|
||||
# if defined(__i386) || defined(_M_IX86) || defined(__INTEL__)
|
||||
# if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__)
|
||||
# define sha1_block_host_order sha1_block_asm_host_order
|
||||
# define DONT_IMPLEMENT_BLOCK_HOST_ORDER
|
||||
# define sha1_block_data_order sha1_block_asm_data_order
|
||||
|
3
crypto/dist/openssl/crypto/x509/x509.h
vendored
3
crypto/dist/openssl/crypto/x509/x509.h
vendored
@ -774,7 +774,6 @@ const char * X509_get_default_private_dir(void );
|
||||
|
||||
X509_REQ * X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
|
||||
X509 * X509_REQ_to_X509(X509_REQ *r, int days,EVP_PKEY *pkey);
|
||||
void ERR_load_X509_strings(void );
|
||||
|
||||
X509_ALGOR * X509_ALGOR_new(void );
|
||||
void X509_ALGOR_free(X509_ALGOR *a);
|
||||
@ -1174,6 +1173,7 @@ int X509_TRUST_get_trust(X509_TRUST *xp);
|
||||
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
||||
* made after this point may be overwritten when the script is next run.
|
||||
*/
|
||||
void ERR_load_X509_strings(void);
|
||||
|
||||
/* Error codes for the X509 functions. */
|
||||
|
||||
@ -1245,4 +1245,3 @@ int X509_TRUST_get_trust(X509_TRUST *xp);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
2
crypto/dist/openssl/crypto/x509/x509_trs.c
vendored
2
crypto/dist/openssl/crypto/x509/x509_trs.c
vendored
@ -79,7 +79,7 @@ static int (*default_trust)(int id, X509 *x, int flags) = obj_trust;
|
||||
static X509_TRUST trstandard[] = {
|
||||
{X509_TRUST_COMPAT, 0, trust_compat, "compatible", 0, NULL},
|
||||
{X509_TRUST_SSL_CLIENT, 0, trust_1oidany, "SSL Client", NID_client_auth, NULL},
|
||||
{X509_TRUST_SSL_SERVER, 0, trust_1oidany, "SSL Client", NID_server_auth, NULL},
|
||||
{X509_TRUST_SSL_SERVER, 0, trust_1oidany, "SSL Server", NID_server_auth, NULL},
|
||||
{X509_TRUST_EMAIL, 0, trust_1oidany, "S/MIME email", NID_email_protect, NULL},
|
||||
};
|
||||
|
||||
|
2
crypto/dist/openssl/crypto/x509/x509_vfy.h
vendored
2
crypto/dist/openssl/crypto/x509/x509_vfy.h
vendored
@ -376,6 +376,8 @@ int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose,
|
||||
int purpose, int trust);
|
||||
void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, long flags);
|
||||
void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, long flags, time_t t);
|
||||
void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,
|
||||
int (*verify_cb)(int, X509_STORE_CTX *));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
21
crypto/dist/openssl/doc/apps/ca.pod
vendored
21
crypto/dist/openssl/doc/apps/ca.pod
vendored
@ -54,6 +54,11 @@ The options descriptions will be divided into each purpose.
|
||||
|
||||
specifies the configuration file to use.
|
||||
|
||||
=item B<-name section>
|
||||
|
||||
specifies the configuration file section to use (overrides
|
||||
B<default_ca> in the B<ca> section).
|
||||
|
||||
=item B<-in filename>
|
||||
|
||||
an input filename containing a single certificate request to be
|
||||
@ -202,8 +207,20 @@ that some software (for example Netscape) can't handle V2 CRLs.
|
||||
|
||||
=head1 CONFIGURATION FILE OPTIONS
|
||||
|
||||
The options for B<ca> are contained in the B<ca> section of the
|
||||
configuration file. Many of these are identical to command line
|
||||
The section of the configuration file containing options for B<ca>
|
||||
is found as follows: If the B<-name> command line option is used,
|
||||
then it names the section to be used. Otherwise the section to
|
||||
be used must be named in the B<default_ca> option of the B<ca> section
|
||||
of the configuration file (or in the default section of the
|
||||
configuration file). Besides B<default_ca>, the following options are
|
||||
read directly from the B<ca> section:
|
||||
RANDFILE
|
||||
preserve
|
||||
msie_hack
|
||||
With the exception of B<RANDFILE>, this is probably a bug and may
|
||||
change in future releases.
|
||||
|
||||
Many of the configuration file options are identical to command line
|
||||
options. Where the option is present in the configuration file
|
||||
and the command line the command line value is used. Where an
|
||||
option is described as mandatory then it must be present in
|
||||
|
4
crypto/dist/openssl/doc/apps/openssl.pod
vendored
4
crypto/dist/openssl/doc/apps/openssl.pod
vendored
@ -125,6 +125,10 @@ Generation of RSA Parameters.
|
||||
|
||||
Generation of hashed passwords.
|
||||
|
||||
=item L<B<pkcs12>|pkcs12(1)>
|
||||
|
||||
PKCS#12 Data Management.
|
||||
|
||||
=item L<B<pkcs7>|pkcs7(1)>
|
||||
|
||||
PKCS#7 Data Management.
|
||||
|
10
crypto/dist/openssl/doc/apps/verify.pod
vendored
10
crypto/dist/openssl/doc/apps/verify.pod
vendored
@ -200,14 +200,14 @@ the signature of the certificate is invalid. Unused.
|
||||
|
||||
the certificate is not yet valid: the notBefore date is after the current time.
|
||||
|
||||
=item B<10 X509_V_ERR_CRL_NOT_YET_VALID: CRL is not yet valid>
|
||||
|
||||
the CRL is not yet valid. Unused.
|
||||
|
||||
=item B<11 X509_V_ERR_CERT_HAS_EXPIRED: Certificate has expired>
|
||||
=item B<10 X509_V_ERR_CERT_HAS_EXPIRED: certificate has expired>
|
||||
|
||||
the certificate has expired: that is the notAfter date is before the current time.
|
||||
|
||||
=item B<11 X509_V_ERR_CRL_NOT_YET_VALID: CRL is not yet valid>
|
||||
|
||||
the CRL is not yet valid. Unused.
|
||||
|
||||
=item B<12 X509_V_ERR_CRL_HAS_EXPIRED: CRL has expired>
|
||||
|
||||
the CRL has expired. Unused.
|
||||
|
2
crypto/dist/openssl/doc/crypto/BN_bn2bin.pod
vendored
2
crypto/dist/openssl/doc/crypto/BN_bn2bin.pod
vendored
@ -49,7 +49,7 @@ with a leading '-' for negative numbers, to the B<BIO> or B<FILE>
|
||||
B<fp>.
|
||||
|
||||
BN_bn2mpi() and BN_mpi2bn() convert B<BIGNUM>s from and to a format
|
||||
that consists of the number's length in bytes represented as a 3-byte
|
||||
that consists of the number's length in bytes represented as a 4-byte
|
||||
big-endian number, and the number itself in big-endian format, where
|
||||
the most significant bit signals a negative number (the representation
|
||||
of numbers with the MSB set is prefixed with null byte).
|
||||
|
5
crypto/dist/openssl/doc/crypto/BN_rand.pod
vendored
5
crypto/dist/openssl/doc/crypto/BN_rand.pod
vendored
@ -14,6 +14,8 @@ BN_rand, BN_pseudo_rand - generate pseudo-random number
|
||||
|
||||
int BN_rand_range(BIGNUM *rnd, BIGNUM *range);
|
||||
|
||||
int BN_pseudo_rand_range(BIGNUM *rnd, int bits, int top, int bottom);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
BN_rand() generates a cryptographically strong pseudo-random number of
|
||||
@ -31,6 +33,8 @@ protocols, but usually not for key generation etc.
|
||||
|
||||
BN_rand_range() generates a cryptographically strong pseudo-random
|
||||
number B<rnd> in the range 0 <lt>= B<rnd> E<lt> B<range>.
|
||||
BN_pseudo_rand_range() does the same, but is based on BN_pseudo_rand(),
|
||||
and hence numbers generated by it are not necessarily unpredictable.
|
||||
|
||||
The PRNG must be seeded prior to calling BN_rand() or BN_rand_range().
|
||||
|
||||
@ -49,5 +53,6 @@ L<RAND_add(3)|RAND_add(3)>, L<RAND_bytes(3)|RAND_bytes(3)>
|
||||
BN_rand() is available in all versions of SSLeay and OpenSSL.
|
||||
BN_pseudo_rand() was added in OpenSSL 0.9.5. The B<top> == -1 case
|
||||
and the function BN_rand_range() were added in OpenSSL 0.9.6a.
|
||||
BN_pseudo_rand_range() was added in OpenSSL 0.9.6c.
|
||||
|
||||
=cut
|
||||
|
@ -192,7 +192,7 @@ EVP_DecryptInit() and EVP_DecryptUpdate() return 1 for success and 0 for failure
|
||||
EVP_DecryptFinal() returns 0 if the decrypt failed or 1 for success.
|
||||
|
||||
EVP_CipherInit() and EVP_CipherUpdate() return 1 for success and 0 for failure.
|
||||
EVP_CipherFinal() returns 1 for a decryption failure or 1 for success.
|
||||
EVP_CipherFinal() returns 0 for a decryption failure or 1 for success.
|
||||
|
||||
EVP_CIPHER_CTX_cleanup() returns 1 for success and 0 for failure.
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
OPENSSL_VERSION_NUMBER, SSLeay SSLeay_version - get OpenSSL version number
|
||||
OPENSSL_VERSION_NUMBER, SSLeay, SSLeay_version - get OpenSSL version number
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
@ -11,7 +11,7 @@ OPENSSL_VERSION_NUMBER, SSLeay SSLeay_version - get OpenSSL version number
|
||||
|
||||
#include <openssl/crypto.h>
|
||||
long SSLeay(void);
|
||||
char *SSLeay_version(int t);
|
||||
const char *SSLeay_version(int t);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
@ -55,21 +55,28 @@ SSLeay_version() returns different strings depending on B<t>:
|
||||
=over 4
|
||||
|
||||
=item SSLEAY_VERSION
|
||||
|
||||
The text variant of the version number and the release date. For example,
|
||||
"OpenSSL 0.9.5a 1 Apr 2000".
|
||||
|
||||
=item SSLEAY_CFLAGS
|
||||
The flags given to the C compiler when compiling OpenSSL are returned in a
|
||||
string.
|
||||
|
||||
The compiler flags set for the compilation process in the form
|
||||
"compiler: ..." if available or "compiler: information not available"
|
||||
otherwise.
|
||||
|
||||
=item SSLEAY_BUILT_ON
|
||||
|
||||
The date of the build process in the form "built on: ..." if available
|
||||
or "built on: date not available" otherwise.
|
||||
|
||||
=item SSLEAY_PLATFORM
|
||||
The platform name used when OpenSSL was configured is returned.
|
||||
|
||||
The "Configure" target of the library build in the form "platform: ..."
|
||||
if available or "platform: information not available" otherwise.
|
||||
|
||||
=back
|
||||
|
||||
If the data request isn't available, a text saying that the information is
|
||||
not available is returned.
|
||||
|
||||
For an unknown B<t>, the text "not available" is returned.
|
||||
|
||||
=head1 RETURN VALUE
|
||||
|
4
crypto/dist/openssl/doc/crypto/blowfish.pod
vendored
4
crypto/dist/openssl/doc/crypto/blowfish.pod
vendored
@ -27,7 +27,7 @@ BF_cfb64_encrypt, BF_ofb64_encrypt, BF_options - Blowfish encryption
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This library implements the Blowfish cipher, which is invented and described
|
||||
This library implements the Blowfish cipher, which was invented and described
|
||||
by Counterpane (see http://www.counterpane.com/blowfish.html ).
|
||||
|
||||
Blowfish is a block cipher that operates on 64 bit (8 byte) blocks of data.
|
||||
@ -57,7 +57,7 @@ for the same message. B<ivec> may be initialized with anything, but the
|
||||
recipient needs to know what it was initialized with, or it won't be able
|
||||
to decrypt. Some programs and protocols simplify this, like SSH, where
|
||||
B<ivec> is simply initialized to zero.
|
||||
BF_cbc_encrypt() operates of data that is a multiple of 8 bytes long, while
|
||||
BF_cbc_encrypt() operates on data that is a multiple of 8 bytes long, while
|
||||
BF_cfb64_encrypt() and BF_ofb64_encrypt() are used to encrypt an variable
|
||||
number of bytes (the amount does not have to be an exact multiple of 8). The
|
||||
purpose of the latter two is to simulate stream ciphers, and therefore, they
|
||||
|
1
crypto/dist/openssl/doc/crypto/bn.pod
vendored
1
crypto/dist/openssl/doc/crypto/bn.pod
vendored
@ -61,6 +61,7 @@ bn - multiprecision integer arithmetics
|
||||
int BN_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
||||
int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
||||
int BN_rand_range(BIGNUM *rnd, BIGNUM *range);
|
||||
int BN_pseudo_rand_range(BIGNUM *rnd, BIGNUM *range);
|
||||
|
||||
BIGNUM *BN_generate_prime(BIGNUM *ret, int bits,int safe, BIGNUM *add,
|
||||
BIGNUM *rem, void (*callback)(int, int, void *), void *cb_arg);
|
||||
|
3
crypto/dist/openssl/doc/crypto/crypto.pod
vendored
3
crypto/dist/openssl/doc/crypto/crypto.pod
vendored
@ -46,7 +46,8 @@ L<sha(3)|sha(3)>
|
||||
|
||||
=item AUXILIARY FUNCTIONS
|
||||
|
||||
L<err(3)|err(3)>, L<threads(3)|threads(3)>, L<rand(3)|rand(3)>
|
||||
L<err(3)|err(3)>, L<threads(3)|threads(3)>, L<rand(3)|rand(3)>,
|
||||
L<OPENSSL_VERSION_NUMBER(3)|OPENSSL_VERSION_NUMBER(3)>
|
||||
|
||||
=item INPUT/OUTPUT, DATA ENCODING
|
||||
|
||||
|
4
crypto/dist/openssl/doc/crypto/des_modes.pod
vendored
4
crypto/dist/openssl/doc/crypto/des_modes.pod
vendored
@ -204,8 +204,8 @@ just one key.
|
||||
=item *
|
||||
|
||||
If the first and last key are the same, the key length is 112 bits.
|
||||
There are attacks that could reduce the key space to 55 bit's but it
|
||||
requires 2^56 blocks of memory.
|
||||
There are attacks that could reduce the effective key strength
|
||||
to only slightly more than 56 bits, but these require a lot of memory.
|
||||
|
||||
=item *
|
||||
|
||||
|
6
crypto/dist/openssl/doc/crypto/threads.pod
vendored
6
crypto/dist/openssl/doc/crypto/threads.pod
vendored
@ -53,8 +53,10 @@ OpenSSL can safely be used in multi-threaded applications provided
|
||||
that at least two callback functions are set.
|
||||
|
||||
locking_function(int mode, int n, const char *file, int line) is
|
||||
needed to perform locking on shared data structures. Multi-threaded
|
||||
applications will crash at random if it is not set.
|
||||
needed to perform locking on shared data structures.
|
||||
(Note that OpenSSL uses a number of global data structures that
|
||||
will be implicitly shared whenever multiple threads use OpenSSL.)
|
||||
Multi-threaded applications will crash at random if it is not set.
|
||||
|
||||
locking_function() must be able to handle up to CRYPTO_num_locks()
|
||||
different mutex locks. It sets the B<n>-th lock if B<mode> &
|
||||
|
@ -69,13 +69,13 @@ to read data. This is mainly because TLS/SSL handshakes may occur at any
|
||||
time during the protocol (initiated by either the client or the server);
|
||||
SSL_read(), SSL_peek(), and SSL_write() will handle any pending handshakes.
|
||||
|
||||
=item SSL_ERROR_WANT_CONNECT
|
||||
=item SSL_ERROR_WANT_CONNECT, SSL_ERROR_WANT_ACCEPT
|
||||
|
||||
The operation did not complete; the same TLS/SSL I/O function should be
|
||||
called again later. The underlying BIO was not connected yet to the peer
|
||||
and the call would block in connect(). The SSL function should be
|
||||
called again when the connection is established. This messages can only
|
||||
appear with a BIO_s_connect() BIO.
|
||||
and the call would block in connect()/accept(). The SSL function should be
|
||||
called again when the connection is established. These messages can only
|
||||
appear with a BIO_s_connect() or BIO_s_accept() BIO, respectively.
|
||||
In order to find out, when the connection has been successfully established,
|
||||
on many platforms select() or poll() for writing on the socket file descriptor
|
||||
can be used.
|
||||
|
67
crypto/dist/openssl/doc/ssl/SSL_shutdown.pod
vendored
67
crypto/dist/openssl/doc/ssl/SSL_shutdown.pod
vendored
@ -22,10 +22,52 @@ Whether the operation succeeds or not, the SSL_SENT_SHUTDOWN flag is set and
|
||||
a currently open session is considered closed and good and will be kept in the
|
||||
session cache for further reuse.
|
||||
|
||||
The behaviour of SSL_shutdown() depends on the underlying BIO.
|
||||
The shutdown procedure consists of 2 steps: the sending of the "close notify"
|
||||
shutdown alert and the reception of the peer's "close notify" shutdown
|
||||
alert. According to the TLS standard, it is acceptable for an application
|
||||
to only send its shutdown alert and then close the underlying connection
|
||||
without waiting for the peer's response (this way resources can be saved,
|
||||
as the process can already terminate or serve another connection).
|
||||
When the underlying connection shall be used for more communications, the
|
||||
complete shutdown procedure (bidirectional "close notify" alerts) must be
|
||||
performed, so that the peers stay synchronized.
|
||||
|
||||
SSL_shutdown() supports both uni- and bidirectional shutdown by its 2 step
|
||||
behaviour.
|
||||
|
||||
=over 4
|
||||
|
||||
=item When the application is the first party to send the "close notify"
|
||||
alert, SSL_shutdown() will only send the alert and the set the
|
||||
SSL_SENT_SHUTDOWN flag (so that the session is considered good and will
|
||||
be kept in cache). SSL_shutdown() will then return with 0. If a unidirectional
|
||||
shutdown is enough (the underlying connection shall be closed anyway), this
|
||||
first call to SSL_shutdown() is sufficient. In order to complete the
|
||||
bidirectional shutdown handshake, SSL_shutdown() must be called again.
|
||||
The second call will make SSL_shutdown() wait for the peer's "close notify"
|
||||
shutdown alert. On success, the second call to SSL_shutdown() will return
|
||||
with 1.
|
||||
|
||||
=item If the peer already sent the "close notify" alert B<and> it was
|
||||
already processed implicitly inside another function
|
||||
(L<SSL_read(3)|SSL_read(3)>), the SSL_RECEIVED_SHUTDOWN flag is set.
|
||||
SSL_shutdown() will send the "close notify" alert, set the SSL_SENT_SHUTDOWN
|
||||
flag and will immediately return with 1.
|
||||
Whether SSL_RECEIVED_SHUTDOWN is already set can be checked using the
|
||||
SSL_get_shutdown() (see also L<SSL_set_shutdown(3)|SSL_set_shutdown(3)> call.
|
||||
|
||||
=back
|
||||
|
||||
It is therefore recommended, to check the return value of SSL_shutdown()
|
||||
and call SSL_shutdown() again, if the bidirectional shutdown is not yet
|
||||
complete (return value of the first call is 0). As the shutdown is not
|
||||
specially handled in the SSLv2 protocol, SSL_shutdown() will succeed on
|
||||
the first call.
|
||||
|
||||
The behaviour of SSL_shutdown() additionally depends on the underlying BIO.
|
||||
|
||||
If the underlying BIO is B<blocking>, SSL_shutdown() will only return once the
|
||||
handshake has been finished or an error occurred.
|
||||
handshake step has been finished or an error occurred.
|
||||
|
||||
If the underlying BIO is B<non-blocking>, SSL_shutdown() will also return
|
||||
when the underlying BIO could not satisfy the needs of SSL_shutdown()
|
||||
@ -38,6 +80,12 @@ nothing is to be done, but select() can be used to check for the required
|
||||
condition. When using a buffering BIO, like a BIO pair, data must be written
|
||||
into or retrieved out of the BIO before being able to continue.
|
||||
|
||||
SSL_shutdown() can be modified to only set the connection to "shutdown"
|
||||
state but not actually send the "close notify" alert messages,
|
||||
see L<SSL_CTX_set_quiet_shutdown(3)|SSL_CTX_set_quiet_shutdown(3)>.
|
||||
When "quiet shutdown" is enabled, SSL_shutdown() will always succeed
|
||||
and return 1.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
The following return values can occur:
|
||||
@ -46,19 +94,23 @@ The following return values can occur:
|
||||
|
||||
=item 1
|
||||
|
||||
The shutdown was successfully completed.
|
||||
The shutdown was successfully completed. The "close notify" alert was sent
|
||||
and the peer's "close notify" alert was received.
|
||||
|
||||
=item 0
|
||||
|
||||
The shutdown was not successful. Call SSL_get_error() with the return
|
||||
value B<ret> to find out the reason.
|
||||
The shutdown is not yet finished. Call SSL_shutdown() for a second time,
|
||||
if a bidirectional shutdown shall be performed.
|
||||
The output of L<SSL_get_error(3)|SSL_get_error(3)> may be misleading, as an
|
||||
erroneous SSL_ERROR_SYSCALL may be flagged even though no error occurred.
|
||||
|
||||
=item -1
|
||||
|
||||
The shutdown was not successful because a fatal error occurred either
|
||||
at the protocol level or a connection failure occurred. It can also occur of
|
||||
at the protocol level or a connection failure occurred. It can also occur if
|
||||
action is need to continue the operation for non-blocking BIOs.
|
||||
Call SSL_get_error() with the return value B<ret> to find out the reason.
|
||||
Call L<SSL_get_error(3)|SSL_get_error(3)> with the return value B<ret>
|
||||
to find out the reason.
|
||||
|
||||
=back
|
||||
|
||||
@ -66,6 +118,7 @@ Call SSL_get_error() with the return value B<ret> to find out the reason.
|
||||
|
||||
L<SSL_get_error(3)|SSL_get_error(3)>, L<SSL_connect(3)|SSL_connect(3)>,
|
||||
L<SSL_accept(3)|SSL_accept(3)>, L<SSL_set_shutdown(3)|SSL_set_shutdown(3)>,
|
||||
L<SSL_CTX_set_quiet_shutdown(3)|SSL_CTX_set_quiet_shutdown(3)>,
|
||||
L<SSL_clear(3)|SSL_clear(3)>, L<SSL_free(3)|SSL_free(3)>,
|
||||
L<ssl(3)|ssl(3)>, L<bio(3)|bio(3)>
|
||||
|
||||
|
28
crypto/dist/openssl/doc/ssl/ssl.pod
vendored
28
crypto/dist/openssl/doc/ssl/ssl.pod
vendored
@ -299,7 +299,7 @@ protocol context defined in the B<SSL_CTX> structure.
|
||||
|
||||
=item void B<SSL_CTX_set_cert_store>(SSL_CTX *ctx, X509_STORE *cs);
|
||||
|
||||
=item void B<SSL_CTX_set_cert_verify_cb>(SSL_CTX *ctx, int (*cb)(SSL_CTX *), char *arg)
|
||||
=item void B<SSL_CTX_set_cert_verify_cb>(SSL_CTX *ctx, int (*cb)(), char *arg)
|
||||
|
||||
=item int B<SSL_CTX_set_cipher_list>(SSL_CTX *ctx, char *str);
|
||||
|
||||
@ -650,8 +650,10 @@ L<openssl(1)|openssl(1)>, L<crypto(3)|crypto(3)>,
|
||||
L<SSL_accept(3)|SSL_accept(3)>, L<SSL_clear(3)|SSL_clear(3)>,
|
||||
L<SSL_connect(3)|SSL_connect(3)>,
|
||||
L<SSL_CIPHER_get_name(3)|SSL_CIPHER_get_name(3)>,
|
||||
L<SSL_COMP_add_compression_method(3)|SSL_COMP_add_compression_method(3)>,
|
||||
L<SSL_CTX_add_extra_chain_cert(3)|SSL_CTX_add_extra_chain_cert(3)>,
|
||||
L<SSL_CTX_add_session(3)|SSL_CTX_add_session(3)>,
|
||||
L<SSL_CTX_ctrl(3)|SSL_CTX_ctrl(3)>,
|
||||
L<SSL_CTX_flush_sessions(3)|SSL_CTX_flush_sessions(3)>,
|
||||
L<SSL_CTX_get_ex_new_index(3)|SSL_CTX_get_ex_new_index(3)>,
|
||||
L<SSL_CTX_get_verify_mode(3)|SSL_CTX_get_verify_mode(3)>,
|
||||
@ -661,18 +663,29 @@ L<SSL_CTX_sess_number(3)|SSL_CTX_sess_number(3)>,
|
||||
L<SSL_CTX_sess_set_cache_size(3)|SSL_CTX_sess_set_cache_size(3)>,
|
||||
L<SSL_CTX_sess_set_get_cb(3)|SSL_CTX_sess_set_get_cb(3)>,
|
||||
L<SSL_CTX_sessions(3)|SSL_CTX_sessions(3)>,
|
||||
L<SSL_CTX_set_cert_store(3)|SSL_CTX_set_cert_store(3)>,
|
||||
L<SSL_CTX_set_cert_verify_callback(3)|SSL_CTX_set_cert_verify_callback(3)>,
|
||||
L<SSL_CTX_set_cipher_list(3)|SSL_CTX_set_cipher_list(3)>,
|
||||
L<SSL_CTX_set_client_CA_list(3)|SSL_CTX_set_client_CA_list(3)>,
|
||||
L<SSL_CTX_set_client_cert_cb(3)|SSL_CTX_set_client_cert_cb(3)>,
|
||||
L<SSL_CTX_set_default_passwd_cb(3)|SSL_CTX_set_default_passwd_cb(3)>,
|
||||
L<SSL_CTX_set_info_callback(3)|SSL_CTX_set_info_callback(3)>,
|
||||
L<SSL_CTX_set_mode(3)|SSL_CTX_set_mode(3)>,
|
||||
L<SSL_CTX_set_options(3)|SSL_CTX_set_options(3)>,
|
||||
L<SSL_CTX_set_quiet_shutdown(3)|SSL_CTX_set_quiet_shutdown(3)>,
|
||||
L<SSL_CTX_set_session_cache_mode(3)|SSL_CTX_set_session_cache_mode(3)>,
|
||||
L<SSL_CTX_set_session_id_context(3)|SSL_CTX_set_session_id_context(3)>,
|
||||
L<SSL_CTX_set_ssl_version(3)|SSL_CTX_set_ssl_version(3)>,
|
||||
L<SSL_CTX_set_timeout(3)|SSL_CTX_set_timeout(3)>,
|
||||
L<SSL_CTX_set_tmp_rsa_callback(3)|SSL_CTX_set_tmp_rsa_callback(3)>,
|
||||
L<SSL_CTX_set_tmp_dh_callback(3)|SSL_CTX_set_tmp_dh_callback(3)>,
|
||||
L<SSL_CTX_set_verify(3)|SSL_CTX_set_verify(3)>,
|
||||
L<SSL_CTX_use_certificate(3)|SSL_CTX_use_certificate(3)>,
|
||||
L<SSL_alert_type_string(3)|SSL_alert_type_string(3)>,
|
||||
L<SSL_get_SSL_CTX(3)|SSL_get_SSL_CTX(3)>,
|
||||
L<SSL_get_ciphers(3)|SSL_get_ciphers(3)>,
|
||||
L<SSL_get_client_CA_list(3)|SSL_get_client_CA_list(3)>,
|
||||
L<SSL_get_default_timeout(3)|SSL_get_default_timeout(3)>,
|
||||
L<SSL_get_error(3)|SSL_get_error(3)>,
|
||||
L<SSL_get_ex_data_X509_STORE_CTX_idx(3)|SSL_get_ex_data_X509_STORE_CTX_idx(3)>,
|
||||
L<SSL_get_ex_new_index(3)|SSL_get_ex_new_index(3)>,
|
||||
@ -685,12 +698,19 @@ L<SSL_get_version(3)|SSL_get_version(3)>,
|
||||
L<SSL_library_init(3)|SSL_library_init(3)>,
|
||||
L<SSL_load_client_CA_file(3)|SSL_load_client_CA_file(3)>,
|
||||
L<SSL_new(3)|SSL_new(3)>,
|
||||
L<SSL_read(3)|SSL_read(3)>, L<SSL_set_bio(3)|SSL_set_bio(3)>,
|
||||
L<SSL_pending(3)|SSL_pending(3)>,
|
||||
L<SSL_read(3)|SSL_read(3)>,
|
||||
L<SSL_rstate_string(3)|SSL_rstate_string(3)>,
|
||||
L<SSL_session_reused(3)|SSL_session_reused(3)>,
|
||||
L<SSL_set_bio(3)|SSL_set_bio(3)>,
|
||||
L<SSL_set_connect_state(3)|SSL_set_connect_state(3)>,
|
||||
L<SSL_set_fd(3)|SSL_set_fd(3)>, L<SSL_pending(3)|SSL_pending(3)>,
|
||||
L<SSL_set_fd(3)|SSL_set_fd(3)>,
|
||||
L<SSL_set_session(3)|SSL_set_session(3)>,
|
||||
L<SSL_set_shutdown(3)|SSL_set_shutdown(3)>,
|
||||
L<SSL_shutdown(3)|SSL_shutdown(3)>, L<SSL_write(3)|SSL_write(3)>,
|
||||
L<SSL_shutdown(3)|SSL_shutdown(3)>,
|
||||
L<SSL_state_string(3)|SSL_state_string(3)>,
|
||||
L<SSL_want(3)|SSL_want(3)>,
|
||||
L<SSL_write(3)|SSL_write(3)>,
|
||||
L<SSL_SESSION_free(3)|SSL_SESSION_free(3)>,
|
||||
L<SSL_SESSION_get_ex_new_index(3)|SSL_SESSION_get_ex_new_index(3)>,
|
||||
L<SSL_SESSION_get_time(3)|SSL_SESSION_get_time(3)>,
|
||||
|
16
crypto/dist/openssl/doc/ssleay.txt
vendored
16
crypto/dist/openssl/doc/ssleay.txt
vendored
@ -1,6 +1,22 @@
|
||||
|
||||
Bundle of old SSLeay documentation files [OBSOLETE!]
|
||||
|
||||
*** WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! ***
|
||||
|
||||
OBSOLETE means that nothing in this document should be trusted. This
|
||||
document is provided mostly for historical purposes (it wasn't even up
|
||||
to date at the time SSLeay 0.8.1 was released) and as inspiration. If
|
||||
you copy some snippet of code from this document, please _check_ that
|
||||
it really is correct from all points of view. For example, you can
|
||||
check with the other documents in this directory tree, or by comparing
|
||||
with relevant parts of the include files.
|
||||
|
||||
People have done the mistake of trusting what's written here. Please
|
||||
don't do that.
|
||||
|
||||
*** WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! ***
|
||||
|
||||
|
||||
==== readme ========================================================
|
||||
|
||||
This is the old 0.6.6 docuementation. Most of the cipher stuff is still
|
||||
|
26
crypto/dist/openssl/e_os.h
vendored
26
crypto/dist/openssl/e_os.h
vendored
@ -82,6 +82,12 @@ extern "C" {
|
||||
#define DEVRANDOM "/dev/urandom"
|
||||
#endif
|
||||
|
||||
#if defined(VXWORKS)
|
||||
# define NO_SYS_PARAM_H
|
||||
# define NO_CHMOD
|
||||
# define NO_SYSLOG
|
||||
#endif
|
||||
|
||||
#if defined(__MWERKS__) && defined(macintosh)
|
||||
# if macintosh==1
|
||||
# ifndef MAC_OS_GUSI_SOURCE
|
||||
@ -148,6 +154,13 @@ extern "C" {
|
||||
#define closesocket(s) MacSocket_close(s)
|
||||
#define readsocket(s,b,n) MacSocket_recv((s),(b),(n),true)
|
||||
#define writesocket(s,b,n) MacSocket_send((s),(b),(n))
|
||||
#elif defined(VMS)
|
||||
#define get_last_socket_error() errno
|
||||
#define clear_socket_error() errno=0
|
||||
#define ioctlsocket(a,b,c) ioctl(a,b,c)
|
||||
#define closesocket(s) close(s)
|
||||
#define readsocket(s,b,n) recv((s),(b),(n),0)
|
||||
#define writesocket(s,b,n) send((s),(b),(n),0)
|
||||
#else
|
||||
#define get_last_socket_error() errno
|
||||
#define clear_socket_error() errno=0
|
||||
@ -338,7 +351,9 @@ extern HINSTANCE _hInstance;
|
||||
# ifndef NO_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
# endif
|
||||
# ifndef MPE
|
||||
# ifdef VXWORKS
|
||||
# include <time.h>
|
||||
# elif !defined(MPE)
|
||||
# include <sys/time.h> /* Needed under linux for FD_XXX */
|
||||
# endif
|
||||
|
||||
@ -403,13 +418,10 @@ extern HINSTANCE _hInstance;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(THREADS) || defined(sun)
|
||||
#ifndef _REENTRANT
|
||||
#define _REENTRANT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(sun) && !defined(__svr4__) && !defined(__SVR4)
|
||||
/* include headers first, so our defines don't break it */
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
/* bcopy can handle overlapping moves according to SunOS 4.1.4 manpage */
|
||||
# define memmove(s1,s2,n) bcopy((s2),(s1),(n))
|
||||
# define strtoul(s,e,b) ((unsigned long int)strtol((s),(e),(b)))
|
||||
|
10
crypto/dist/openssl/rsaref/rsaref.h
vendored
10
crypto/dist/openssl/rsaref/rsaref.h
vendored
@ -130,17 +130,21 @@ int R_GetRandomBytesNeeded(unsigned int *,RSARandomState *rnd);
|
||||
int R_RandomUpdate(RSARandomState *rnd, unsigned char *data, unsigned int n);
|
||||
int R_RandomFinal(RSARandomState *rnd);
|
||||
|
||||
void ERR_load_RSAREF_strings(void );
|
||||
RSA_METHOD *RSA_PKCS1_RSAref(void );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
||||
* made after this point may be overwritten when the script is next run.
|
||||
*/
|
||||
void ERR_load_RSAREF_strings(void);
|
||||
|
||||
/* Error codes for the RSAREF functions. */
|
||||
|
||||
@ -175,4 +179,8 @@ RSA_METHOD *RSA_PKCS1_RSAref(void );
|
||||
#define RSAREF_R_SIGNATURE 0x040b
|
||||
#define RSAREF_R_SIGNATURE_ENCODING 0x040c
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
33
crypto/dist/openssl/ssl/s3_lib.c
vendored
33
crypto/dist/openssl/ssl/s3_lib.c
vendored
@ -56,7 +56,7 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -170,7 +170,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={
|
||||
SSL3_TXT_ADH_RC4_128_MD5,
|
||||
SSL3_CK_ADH_RC4_128_MD5,
|
||||
SSL_kEDH |SSL_aNULL|SSL_RC4 |SSL_MD5 |SSL_SSLV3,
|
||||
SSL_NOT_EXP,
|
||||
SSL_NOT_EXP|SSL_MEDIUM,
|
||||
0,
|
||||
128,
|
||||
128,
|
||||
@ -196,7 +196,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={
|
||||
SSL3_TXT_ADH_DES_64_CBC_SHA,
|
||||
SSL3_CK_ADH_DES_64_CBC_SHA,
|
||||
SSL_kEDH |SSL_aNULL|SSL_DES |SSL_SHA1|SSL_SSLV3,
|
||||
SSL_NOT_EXP,
|
||||
SSL_NOT_EXP|SSL_LOW,
|
||||
0,
|
||||
56,
|
||||
56,
|
||||
@ -209,7 +209,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={
|
||||
SSL3_TXT_ADH_DES_192_CBC_SHA,
|
||||
SSL3_CK_ADH_DES_192_CBC_SHA,
|
||||
SSL_kEDH |SSL_aNULL|SSL_3DES |SSL_SHA1|SSL_SSLV3,
|
||||
SSL_NOT_EXP,
|
||||
SSL_NOT_EXP|SSL_HIGH,
|
||||
0,
|
||||
168,
|
||||
168,
|
||||
@ -520,7 +520,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={
|
||||
SSL3_TXT_FZA_DMS_RC4_SHA,
|
||||
SSL3_CK_FZA_DMS_RC4_SHA,
|
||||
SSL_kFZA|SSL_aFZA |SSL_RC4 |SSL_SHA1|SSL_SSLV3,
|
||||
SSL_NOT_EXP,
|
||||
SSL_NOT_EXP|SSL_MEDIUM,
|
||||
0,
|
||||
128,
|
||||
128,
|
||||
@ -614,7 +614,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={
|
||||
TLS1_TXT_DHE_DSS_WITH_RC4_128_SHA,
|
||||
TLS1_CK_DHE_DSS_WITH_RC4_128_SHA,
|
||||
SSL_kEDH|SSL_aDSS|SSL_RC4|SSL_SHA|SSL_TLSV1,
|
||||
SSL_NOT_EXP,
|
||||
SSL_NOT_EXP|SSL_MEDIUM,
|
||||
0,
|
||||
128,
|
||||
128,
|
||||
@ -695,6 +695,9 @@ SSL_CIPHER *ssl3_get_cipher(unsigned int u)
|
||||
|
||||
int ssl3_pending(SSL *s)
|
||||
{
|
||||
if (s->rstate == SSL_ST_READ_BODY)
|
||||
return 0;
|
||||
|
||||
return (s->s3->rrec.type == SSL3_RT_APPLICATION_DATA) ? s->s3->rrec.length : 0;
|
||||
}
|
||||
|
||||
@ -739,6 +742,7 @@ void ssl3_free(SSL *s)
|
||||
void ssl3_clear(SSL *s)
|
||||
{
|
||||
unsigned char *rp,*wp;
|
||||
size_t rlen, wlen;
|
||||
|
||||
ssl3_cleanup_key_block(s);
|
||||
if (s->s3->tmp.ca_names != NULL)
|
||||
@ -754,12 +758,16 @@ void ssl3_clear(SSL *s)
|
||||
DH_free(s->s3->tmp.dh);
|
||||
#endif
|
||||
|
||||
rp=s->s3->rbuf.buf;
|
||||
wp=s->s3->wbuf.buf;
|
||||
rp = s->s3->rbuf.buf;
|
||||
wp = s->s3->wbuf.buf;
|
||||
rlen = s->s3->rbuf_len;
|
||||
wlen = s->s3->wbuf_len;
|
||||
|
||||
memset(s->s3,0,sizeof *s->s3);
|
||||
if (rp != NULL) s->s3->rbuf.buf=rp;
|
||||
if (wp != NULL) s->s3->wbuf.buf=wp;
|
||||
s->s3->rbuf.buf = rp;
|
||||
s->s3->wbuf.buf = wp;
|
||||
s->s3->rbuf_len = rlen;
|
||||
s->s3->wbuf_len = wlen;
|
||||
|
||||
ssl_free_wbio_buffer(s);
|
||||
|
||||
@ -1314,13 +1322,12 @@ static int ssl3_read_internal(SSL *s, void *buf, int len, int peek)
|
||||
if (s->s3->renegotiate) ssl3_renegotiate_check(s);
|
||||
s->s3->in_read_app_data=1;
|
||||
ret=ssl3_read_bytes(s,SSL3_RT_APPLICATION_DATA,buf,len,peek);
|
||||
if ((ret == -1) && (s->s3->in_read_app_data == 0))
|
||||
if ((ret == -1) && (s->s3->in_read_app_data == 2))
|
||||
{
|
||||
/* ssl3_read_bytes decided to call s->handshake_func, which
|
||||
* called ssl3_read_bytes to read handshake data.
|
||||
* However, ssl3_read_bytes actually found application data
|
||||
* and thinks that application data makes sense here (signalled
|
||||
* by resetting 'in_read_app_data', strangely); so disable
|
||||
* and thinks that application data makes sense here; so disable
|
||||
* handshake processing and try to read application data again. */
|
||||
s->in_handshake++;
|
||||
ret=ssl3_read_bytes(s,SSL3_RT_APPLICATION_DATA,buf,len,peek);
|
||||
|
65
crypto/dist/openssl/ssl/ssl.h
vendored
65
crypto/dist/openssl/ssl/ssl.h
vendored
@ -55,6 +55,59 @@
|
||||
* copied and put under another distribution licence
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* openssl-core@openssl.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef HEADER_SSL_H
|
||||
#define HEADER_SSL_H
|
||||
@ -563,7 +616,11 @@ struct ssl_st
|
||||
|
||||
int server; /* are we the server side? - mostly used by SSL_clear*/
|
||||
|
||||
int new_session;/* 1 if we are to use a new session */
|
||||
int new_session;/* 1 if we are to use a new session.
|
||||
* 2 if we are a server and are inside a handshake
|
||||
* (i.e. not just sending a HelloRequest)
|
||||
* NB: For servers, the 'new' session may actually be a previously
|
||||
* cached session or even the previous session */
|
||||
int quiet_shutdown;/* don't send shutdown packets */
|
||||
int shutdown; /* we have shut things down, 0x01 sent, 0x02
|
||||
* for received */
|
||||
@ -909,6 +966,8 @@ char * SSL_CIPHER_get_version(SSL_CIPHER *c);
|
||||
const char * SSL_CIPHER_get_name(SSL_CIPHER *c);
|
||||
|
||||
int SSL_get_fd(SSL *s);
|
||||
int SSL_get_rfd(SSL *s);
|
||||
int SSL_get_wfd(SSL *s);
|
||||
const char * SSL_get_cipher_list(SSL *s,int n);
|
||||
char * SSL_get_shared_ciphers(SSL *s, char *buf, int len);
|
||||
int SSL_get_read_ahead(SSL * s);
|
||||
@ -947,7 +1006,6 @@ int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,
|
||||
int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,
|
||||
const char *dir);
|
||||
|
||||
void ERR_load_SSL_strings(void );
|
||||
void SSL_load_error_strings(void );
|
||||
char * SSL_state_string(SSL *s);
|
||||
char * SSL_rstate_string(SSL *s);
|
||||
@ -1351,6 +1409,7 @@ void ERR_load_SSL_strings(void);
|
||||
#define SSL_R_DATA_BETWEEN_CCS_AND_FINISHED 145
|
||||
#define SSL_R_DATA_LENGTH_TOO_LONG 146
|
||||
#define SSL_R_DECRYPTION_FAILED 147
|
||||
#define SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC 1109
|
||||
#define SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG 148
|
||||
#define SSL_R_DIGEST_CHECK_FAILED 149
|
||||
#define SSL_R_ENCRYPTED_LENGTH_TOO_LONG 150
|
||||
@ -1361,6 +1420,7 @@ void ERR_load_SSL_strings(void);
|
||||
#define SSL_R_GOT_A_FIN_BEFORE_A_CCS 154
|
||||
#define SSL_R_HTTPS_PROXY_REQUEST 155
|
||||
#define SSL_R_HTTP_REQUEST 156
|
||||
#define SSL_R_ILLEGAL_PADDING 1110
|
||||
#define SSL_R_INTERNAL_ERROR 157
|
||||
#define SSL_R_INVALID_CHALLENGE_LENGTH 158
|
||||
#define SSL_R_INVALID_COMMAND 280
|
||||
@ -1370,6 +1430,7 @@ void ERR_load_SSL_strings(void);
|
||||
#define SSL_R_LENGTH_TOO_SHORT 160
|
||||
#define SSL_R_LIBRARY_BUG 274
|
||||
#define SSL_R_LIBRARY_HAS_NO_CIPHERS 161
|
||||
#define SSL_R_MESSAGE_TOO_LONG 1111
|
||||
#define SSL_R_MISSING_DH_DSA_CERT 162
|
||||
#define SSL_R_MISSING_DH_KEY 163
|
||||
#define SSL_R_MISSING_DH_RSA_CERT 164
|
||||
|
71
crypto/dist/openssl/ssl/ssl3.h
vendored
71
crypto/dist/openssl/ssl/ssl3.h
vendored
@ -55,6 +55,59 @@
|
||||
* copied and put under another distribution licence
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* openssl-core@openssl.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef HEADER_SSL3_H
|
||||
#define HEADER_SSL3_H
|
||||
@ -199,10 +252,13 @@ typedef struct ssl3_record_st
|
||||
|
||||
typedef struct ssl3_buffer_st
|
||||
{
|
||||
unsigned char *buf; /* SSL3_RT_MAX_PACKET_SIZE bytes (more if
|
||||
* SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER is set) */
|
||||
int offset; /* where to 'copy from' */
|
||||
int left; /* how many bytes left */
|
||||
unsigned char *buf; /* at least SSL3_RT_MAX_PACKET_SIZE bytes,
|
||||
* see ssl3_setup_buffers() */
|
||||
#if 0 /* put directly into SSL3_STATE for best possible binary compatibility within 0.9.6 series */
|
||||
size_t len; /* buffer size */
|
||||
#endif
|
||||
int offset; /* where to 'copy from' */
|
||||
int left; /* how many bytes left */
|
||||
} SSL3_BUFFER;
|
||||
|
||||
#define SSL3_CT_RSA_SIGN 1
|
||||
@ -313,6 +369,13 @@ typedef struct ssl3_state_st
|
||||
int cert_request;
|
||||
} tmp;
|
||||
|
||||
/* flags for countermeasure against known-IV weakness */
|
||||
int need_empty_fragments;
|
||||
int empty_fragment_done;
|
||||
|
||||
size_t rbuf_len; /* substitute for rbuf.len */
|
||||
size_t wbuf_len; /* substitute for wbuf.len */
|
||||
|
||||
} SSL3_STATE;
|
||||
|
||||
/* SSLv3 */
|
||||
|
5
crypto/dist/openssl/ssl/ssl_cert.c
vendored
5
crypto/dist/openssl/ssl/ssl_cert.c
vendored
@ -461,6 +461,9 @@ int ssl_verify_cert_chain(SSL *s,STACK_OF(X509) *sk)
|
||||
|
||||
X509_STORE_CTX_purpose_inherit(&ctx, i, s->purpose, s->trust);
|
||||
|
||||
if (s->verify_callback)
|
||||
X509_STORE_CTX_set_verify_cb(&ctx, s->verify_callback);
|
||||
|
||||
if (s->ctx->app_verify_callback != NULL)
|
||||
i=s->ctx->app_verify_callback(&ctx); /* should pass app_verify_arg */
|
||||
else
|
||||
@ -748,7 +751,7 @@ int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack,
|
||||
ret = 1;
|
||||
|
||||
err:
|
||||
closedir(d);
|
||||
if (d) closedir(d);
|
||||
CRYPTO_w_unlock(CRYPTO_LOCK_READDIR);
|
||||
return ret;
|
||||
}
|
||||
|
2
crypto/dist/openssl/util/selftest.pl
vendored
2
crypto/dist/openssl/util/selftest.pl
vendored
@ -57,7 +57,7 @@ chomp $cversion;
|
||||
|
||||
if (open(IN,"<CHANGES")) {
|
||||
while(<IN>) {
|
||||
if (/\*\) (.{0,55})/) {
|
||||
if (/\*\) (.{0,55})/ && !/applies to/) {
|
||||
$last=$1;
|
||||
last;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: shl.mi,v 1.164 2002/05/29 20:08:33 christos Exp $
|
||||
# $NetBSD: shl.mi,v 1.165 2002/06/09 16:12:53 itojun Exp $
|
||||
# Note: libtermcap and libtermlib are hardlinked and share the same version.
|
||||
./usr/lib/libamu.so.2.1 base-amd-shlib
|
||||
./usr/lib/libasn1.so.6.0 base-krb5-shlib
|
||||
@ -7,7 +7,7 @@
|
||||
./usr/lib/libcdk.so.1.0 base-sys-shlib
|
||||
./usr/lib/libcom_err.so.4.1 base-krb5-shlib
|
||||
./usr/lib/libcrypt.so.0.1 base-sys-shlib
|
||||
./usr/lib/libcrypto.so.1.0 base-crypto-shlib
|
||||
./usr/lib/libcrypto.so.1.1 base-crypto-shlib
|
||||
./usr/lib/libcurses.so.5.0 base-sys-shlib
|
||||
./usr/lib/libdes.so.5.1 base-crypto-shlib
|
||||
./usr/lib/libedit.so.2.6 base-sys-shlib
|
||||
@ -37,7 +37,7 @@
|
||||
./usr/lib/libskey.so.1.0 base-sys-shlib
|
||||
./usr/lib/libsl.so.2.0 base-krb5-shlib
|
||||
./usr/lib/libss.so.4.0 base-krb5-shlib
|
||||
./usr/lib/libssl.so.2.0 base-crypto-shlib
|
||||
./usr/lib/libssl.so.2.1 base-crypto-shlib
|
||||
./usr/lib/libtelnet.so.4.0 base-krb5-shlib
|
||||
./usr/lib/libtermcap.so.0.5 base-sys-shlib
|
||||
./usr/lib/libtermlib.so.0.5 base-sys-shlib
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: mi,v 1.447 2002/06/07 12:11:29 is Exp $
|
||||
# $NetBSD: mi,v 1.448 2002/06/09 16:12:53 itojun Exp $
|
||||
./sys comp-sysutil-root
|
||||
./usr/bin/addr2line comp-debug-bin
|
||||
./usr/bin/ar comp-util-bin
|
||||
@ -1431,8 +1431,10 @@
|
||||
./usr/share/man/cat3/SIMPLEQ_REMOVE.0 comp-c-catman
|
||||
./usr/share/man/cat3/SIMPLEQ_REMOVE_HEAD.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CIPHER_get_name.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_COMP_add_compression_method.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_add_extra_chain_cert.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_add_session.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_ctrl.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_flush_sessions.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_free.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_get_ex_new_index.0 comp-c-catman
|
||||
@ -1443,27 +1445,37 @@
|
||||
./usr/share/man/cat3/SSL_CTX_sess_set_cache_size.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_sess_set_get_cb.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_sessions.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_set_cert_store.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_set_cert_verify_callback.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_set_cipher_list.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_set_client_CA_list.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_set_client_cert_cb.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_set_default_passwd_cb.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_set_info_callback.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_set_mode.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_set_options.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_set_quiet_shutdown.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_set_session_cache_mode.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_set_session_id_context.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_set_ssl_version.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_set_timeout.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_set_tmp_dh_callback.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_set_tmp_rsa_callback.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_set_verify.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_CTX_use_certificate.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_SESSION_free.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_SESSION_get_ex_new_index.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_SESSION_get_time.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_accept.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_alert_type_string.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_clear.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_connect.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_free.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_get_SSL_CTX.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_get_ciphers.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_get_client_CA_list.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_get_current_cipher.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_get_default_timeout.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_get_error.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_get_ex_data_X509_STORE_CTX_idx.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_get_ex_new_index.0 comp-c-catman
|
||||
@ -1479,6 +1491,8 @@
|
||||
./usr/share/man/cat3/SSL_new.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_pending.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_read.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_rstate_string.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_session_reused.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_set_bio.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_set_connect_state.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_set_fd.0 comp-c-catman
|
||||
@ -1486,6 +1500,8 @@
|
||||
./usr/share/man/cat3/SSL_set_shutdown.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_set_verify_result.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_shutdown.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_state_string.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_want.0 comp-c-catman
|
||||
./usr/share/man/cat3/SSL_write.0 comp-c-catman
|
||||
./usr/share/man/cat3/TAILQ_EMPTY.0 comp-c-catman
|
||||
./usr/share/man/cat3/TAILQ_ENTRY.0 comp-c-catman
|
||||
@ -3951,8 +3967,10 @@
|
||||
./usr/share/man/man3/SIMPLEQ_REMOVE.3 comp-c-man
|
||||
./usr/share/man/man3/SIMPLEQ_REMOVE_HEAD.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CIPHER_get_name.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_COMP_add_compression_method.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_add_extra_chain_cert.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_add_session.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_ctrl.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_flush_sessions.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_free.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_get_ex_new_index.3 comp-c-man
|
||||
@ -3963,27 +3981,37 @@
|
||||
./usr/share/man/man3/SSL_CTX_sess_set_cache_size.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_sess_set_get_cb.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_sessions.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_set_cert_store.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_set_cert_verify_callback.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_set_cipher_list.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_set_client_CA_list.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_set_client_cert_cb.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_set_default_passwd_cb.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_set_info_callback.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_set_mode.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_set_options.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_set_quiet_shutdown.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_set_session_cache_mode.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_set_session_id_context.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_set_ssl_version.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_set_timeout.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_set_tmp_dh_callback.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_set_tmp_rsa_callback.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_set_verify.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_CTX_use_certificate.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_SESSION_free.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_SESSION_get_ex_new_index.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_SESSION_get_time.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_accept.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_alert_type_string.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_clear.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_connect.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_free.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_get_SSL_CTX.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_get_ciphers.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_get_client_CA_list.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_get_current_cipher.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_get_default_timeout.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_get_error.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_get_ex_data_X509_STORE_CTX_idx.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_get_ex_new_index.3 comp-c-man
|
||||
@ -3999,6 +4027,8 @@
|
||||
./usr/share/man/man3/SSL_new.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_pending.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_read.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_rstate_string.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_session_reused.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_set_bio.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_set_connect_state.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_set_fd.3 comp-c-man
|
||||
@ -4006,6 +4036,8 @@
|
||||
./usr/share/man/man3/SSL_set_shutdown.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_set_verify_result.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_shutdown.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_state_string.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_want.3 comp-c-man
|
||||
./usr/share/man/man3/SSL_write.3 comp-c-man
|
||||
./usr/share/man/man3/TAILQ_EMPTY.3 comp-c-man
|
||||
./usr/share/man/man3/TAILQ_ENTRY.3 comp-c-man
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile,v 1.15 2002/05/02 16:24:24 wiz Exp $
|
||||
# $NetBSD: Makefile,v 1.16 2002/06/09 16:12:54 itojun Exp $
|
||||
|
||||
# RCSid:
|
||||
# Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
|
||||
@ -22,7 +22,7 @@
|
||||
WARNS=0
|
||||
|
||||
LIB= crypto
|
||||
CPPFLAGS+= -Dlib${LIB} -I. -I${OPENSSLSRC}/crypto
|
||||
CPPFLAGS+= -nostdinc -Dlib${LIB} -I. -I${OPENSSLSRC}/crypto -I/usr/include
|
||||
|
||||
CRYPTODIST= ${.CURDIR}/../../crypto/dist
|
||||
|
||||
|
@ -59,6 +59,14 @@ MAN+= BIO_ctrl.3 BIO_f_base64.3 BIO_f_buffer.3 BIO_f_cipher.3 BIO_f_md.3 \
|
||||
openssl_lhash.3 openssl_md5.3 openssl_mdc2.3 openssl_rand.3 \
|
||||
openssl_rc4.3 openssl_ripemd.3 openssl_rsa.3 openssl_sha.3 \
|
||||
openssl_threads.3 ssl.3
|
||||
MAN+= SSL_COMP_add_compression_method.3 SSL_CTX_ctrl.3 \
|
||||
SSL_CTX_set_cert_store.3 SSL_CTX_set_cert_verify_callback.3 \
|
||||
SSL_CTX_set_client_cert_cb.3 SSL_CTX_set_info_callback.3 \
|
||||
SSL_CTX_set_quiet_shutdown.3 SSL_CTX_set_tmp_dh_callback.3 \
|
||||
SSL_CTX_set_tmp_rsa_callback.3 SSL_alert_type_string.3 \
|
||||
SSL_get_SSL_CTX.3 SSL_get_default_timeout.3 \
|
||||
SSL_rstate_string.3 SSL_session_reused.3 SSL_state_string.3 \
|
||||
SSL_want.3
|
||||
|
||||
MAN+= openssl.cnf.5
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BIO_ctrl.3,v 1.2 2002/02/07 07:00:36 ross Exp $
|
||||
.\" $NetBSD: BIO_ctrl.3,v 1.3 2002/06/09 16:12:54 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:36 2001
|
||||
.\" Mon Jun 10 00:55:34 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BIO_ctrl 3"
|
||||
.TH BIO_ctrl 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BIO_ctrl 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BIO_ctrl, BIO_callback_ctrl, BIO_ptr_ctrl, BIO_int_ctrl, BIO_reset,
|
||||
@ -152,7 +152,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bio.h\*[Gt]
|
||||
\& #include <openssl/bio.h>
|
||||
.Ve
|
||||
.Vb 4
|
||||
\& long BIO_ctrl(BIO *bp,int cmd,long larg,void *parg);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BIO_f_base64.3,v 1.2 2002/02/07 07:00:36 ross Exp $
|
||||
.\" $NetBSD: BIO_f_base64.3,v 1.3 2002/06/09 16:12:55 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:37 2001
|
||||
.\" Mon Jun 10 00:55:34 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BIO_f_base64 3"
|
||||
.TH BIO_f_base64 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BIO_f_base64 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BIO_f_base64 \- base64 \s-1BIO\s0 filter
|
||||
@ -149,8 +149,8 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& #include \*[Lt]openssl/bio.h\*[Gt]
|
||||
\& #include \*[Lt]openssl/evp.h\*[Gt]
|
||||
\& #include <openssl/bio.h>
|
||||
\& #include <openssl/evp.h>
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& BIO_METHOD * BIO_f_base64(void);
|
||||
@ -210,7 +210,7 @@ data to standard output:
|
||||
\& bio = BIO_new_fp(stdin, BIO_NOCLOSE);
|
||||
\& bio_out = BIO_new_fp(stdout, BIO_NOCLOSE);
|
||||
\& bio = BIO_push(b64, bio);
|
||||
\& while((inlen = BIO_read(bio, inbuf, strlen(message))) \*[Gt] 0)
|
||||
\& while((inlen = BIO_read(bio, inbuf, strlen(message))) > 0)
|
||||
\& BIO_write(bio_out, inbuf, inlen);
|
||||
.Ve
|
||||
.Vb 1
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BIO_f_buffer.3,v 1.2 2002/02/07 07:00:36 ross Exp $
|
||||
.\" $NetBSD: BIO_f_buffer.3,v 1.3 2002/06/09 16:12:55 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:37 2001
|
||||
.\" Mon Jun 10 00:55:34 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BIO_f_buffer 3"
|
||||
.TH BIO_f_buffer 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BIO_f_buffer 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BIO_f_buffer \- buffering \s-1BIO\s0
|
||||
@ -149,7 +149,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bio.h\*[Gt]
|
||||
\& #include <openssl/bio.h>
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& BIO_METHOD * BIO_f_buffer(void);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BIO_f_cipher.3,v 1.2 2002/02/07 07:00:36 ross Exp $
|
||||
.\" $NetBSD: BIO_f_cipher.3,v 1.3 2002/06/09 16:12:55 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:38 2001
|
||||
.\" Mon Jun 10 00:55:34 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BIO_f_cipher 3"
|
||||
.TH BIO_f_cipher 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BIO_f_cipher 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BIO_f_cipher, BIO_set_cipher, BIO_get_cipher_status, BIO_get_cipher_ctx \- cipher \s-1BIO\s0 filter
|
||||
@ -149,8 +149,8 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& #include \*[Lt]openssl/bio.h\*[Gt]
|
||||
\& #include \*[Lt]openssl/evp.h\*[Gt]
|
||||
\& #include <openssl/bio.h>
|
||||
\& #include <openssl/evp.h>
|
||||
.Ve
|
||||
.Vb 5
|
||||
\& BIO_METHOD * BIO_f_cipher(void);
|
||||
@ -172,7 +172,7 @@ Cipher BIOs do not support \fIBIO_gets()\fR or \fIBIO_puts()\fR.
|
||||
used to signal that no more data is to be encrypted: this is used
|
||||
to flush and possibly pad the final block through the \s-1BIO\s0.
|
||||
.PP
|
||||
\&\fIBIO_set_cipher()\fR sets the cipher of \s-1BIO\s0 \*[Lt]b\*[Gt] to \fBcipher\fR using key \fBkey\fR
|
||||
\&\fIBIO_set_cipher()\fR sets the cipher of \s-1BIO\s0 <b> to \fBcipher\fR using key \fBkey\fR
|
||||
and \s-1IV\s0 \fBiv\fR. \fBenc\fR should be set to 1 for encryption and zero for
|
||||
decryption.
|
||||
.PP
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BIO_f_md.3,v 1.3 2002/02/07 09:24:08 ross Exp $
|
||||
.\" $NetBSD: BIO_f_md.3,v 1.4 2002/06/09 16:12:55 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:38 2001
|
||||
.\" Mon Jun 10 00:55:35 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BIO_f_md 3"
|
||||
.TH BIO_f_md 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BIO_f_md 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BIO_f_md, BIO_set_md, BIO_get_md, BIO_get_md_ctx \- message digest \s-1BIO\s0 filter
|
||||
@ -149,8 +149,8 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& #include \*[Lt]openssl/bio.h\*[Gt]
|
||||
\& #include \*[Lt]openssl/evp.h\*[Gt]
|
||||
\& #include <openssl/bio.h>
|
||||
\& #include <openssl/evp.h>
|
||||
.Ve
|
||||
.Vb 4
|
||||
\& BIO_METHOD * BIO_f_md(void);
|
||||
@ -244,7 +244,7 @@ The next example digests data by reading through a chain instead:
|
||||
\& do {
|
||||
\& rdlen = BIO_read(bio, buf, sizeof(buf));
|
||||
\& /* Might want to do something with the data here */
|
||||
\& } while(rdlen \*[Gt] 0);
|
||||
\& } while(rdlen > 0);
|
||||
.Ve
|
||||
This next example retrieves the message digests from a \s-1BIO\s0 chain and
|
||||
outputs them. This could be used with the examples above.
|
||||
@ -259,10 +259,10 @@ outputs them. This could be used with the examples above.
|
||||
\& EVP_MD *md;
|
||||
\& mdtmp = BIO_find_type(mdtmp, BIO_TYPE_MD);
|
||||
\& if(!mdtmp) break;
|
||||
\& BIO_get_md(mdtmp, \*[Am]md);
|
||||
\& BIO_get_md(mdtmp, &md);
|
||||
\& printf("%s digest", OBJ_nid2sn(EVP_MD_type(md)));
|
||||
\& mdlen = BIO_gets(mdtmp, mdbuf, EVP_MAX_MD_SIZE);
|
||||
\& for(i = 0; i \*[Lt] mdlen; i++) printf(":%02X", mdbuf[i]);
|
||||
\& for(i = 0; i < mdlen; i++) printf(":%02X", mdbuf[i]);
|
||||
\& printf("\en");
|
||||
\& mdtmp = BIO_next(mdtmp);
|
||||
\& } while(mdtmp);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BIO_f_null.3,v 1.2 2002/02/07 07:00:36 ross Exp $
|
||||
.\" $NetBSD: BIO_f_null.3,v 1.3 2002/06/09 16:12:56 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:38 2001
|
||||
.\" Mon Jun 10 00:55:35 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BIO_f_null 3"
|
||||
.TH BIO_f_null 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BIO_f_null 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BIO_f_null \- null filter
|
||||
@ -149,7 +149,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bio.h\*[Gt]
|
||||
\& #include <openssl/bio.h>
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& BIO_METHOD * BIO_f_null(void);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BIO_f_ssl.3,v 1.3 2002/02/07 09:24:08 ross Exp $
|
||||
.\" $NetBSD: BIO_f_ssl.3,v 1.4 2002/06/09 16:12:56 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:39 2001
|
||||
.\" Mon Jun 10 00:55:35 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BIO_f_ssl 3"
|
||||
.TH BIO_f_ssl 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BIO_f_ssl 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BIO_f_ssl, BIO_set_ssl, BIO_get_ssl, BIO_set_ssl_mode, BIO_set_ssl_renegotiate_bytes,
|
||||
@ -152,8 +152,8 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 2
|
||||
\& #include \*[Lt]openssl/bio.h\*[Gt]
|
||||
\& #include \*[Lt]openssl/ssl.h\*[Gt]
|
||||
\& #include <openssl/bio.h>
|
||||
\& #include <openssl/ssl.h>
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& BIO_METHOD *BIO_f_ssl(void);
|
||||
@ -308,7 +308,7 @@ unencrypted example in BIO_s_connect(3).
|
||||
\& sbio = BIO_new_ssl_connect(ctx);
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& BIO_get_ssl(sbio, \*[Am]ssl);
|
||||
\& BIO_get_ssl(sbio, &ssl);
|
||||
.Ve
|
||||
.Vb 4
|
||||
\& if(!ssl) {
|
||||
@ -328,14 +328,14 @@ unencrypted example in BIO_s_connect(3).
|
||||
.Ve
|
||||
.Vb 6
|
||||
\& out = BIO_new_fp(stdout, BIO_NOCLOSE);
|
||||
\& if(BIO_do_connect(sbio) \*[Le] 0) {
|
||||
\& if(BIO_do_connect(sbio) <= 0) {
|
||||
\& fprintf(stderr, "Error connecting to server\en");
|
||||
\& ERR_print_errors_fp(stderr);
|
||||
\& /* whatever ... */
|
||||
\& }
|
||||
.Ve
|
||||
.Vb 5
|
||||
\& if(BIO_do_handshake(sbio) \*[Le] 0) {
|
||||
\& if(BIO_do_handshake(sbio) <= 0) {
|
||||
\& fprintf(stderr, "Error establishing SSL connection\en");
|
||||
\& ERR_print_errors_fp(stderr);
|
||||
\& /* whatever ... */
|
||||
@ -348,7 +348,7 @@ unencrypted example in BIO_s_connect(3).
|
||||
\& BIO_puts(sbio, "GET / HTTP/1.0\en\en");
|
||||
\& for(;;) {
|
||||
\& len = BIO_read(sbio, tmpbuf, 1024);
|
||||
\& if(len \*[Le] 0) break;
|
||||
\& if(len <= 0) break;
|
||||
\& BIO_write(out, tmpbuf, len);
|
||||
\& }
|
||||
\& BIO_free_all(sbio);
|
||||
@ -398,7 +398,7 @@ a client and also echoes the request to standard output.
|
||||
\& sbio=BIO_new_ssl(ctx,0);
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& BIO_get_ssl(sbio, \*[Am]ssl);
|
||||
\& BIO_get_ssl(sbio, &ssl);
|
||||
.Ve
|
||||
.Vb 4
|
||||
\& if(!ssl) {
|
||||
@ -438,7 +438,7 @@ a client and also echoes the request to standard output.
|
||||
.Ve
|
||||
.Vb 6
|
||||
\& /* Setup accept BIO */
|
||||
\& if(BIO_do_accept(acpt) \*[Le] 0) {
|
||||
\& if(BIO_do_accept(acpt) <= 0) {
|
||||
\& fprintf(stderr, "Error setting up accept BIO\en");
|
||||
\& ERR_print_errors_fp(stderr);
|
||||
\& return 0;
|
||||
@ -446,7 +446,7 @@ a client and also echoes the request to standard output.
|
||||
.Ve
|
||||
.Vb 6
|
||||
\& /* Now wait for incoming connection */
|
||||
\& if(BIO_do_accept(acpt) \*[Le] 0) {
|
||||
\& if(BIO_do_accept(acpt) <= 0) {
|
||||
\& fprintf(stderr, "Error in connection\en");
|
||||
\& ERR_print_errors_fp(stderr);
|
||||
\& return 0;
|
||||
@ -464,7 +464,7 @@ a client and also echoes the request to standard output.
|
||||
\& BIO_free_all(acpt);
|
||||
.Ve
|
||||
.Vb 5
|
||||
\& if(BIO_do_handshake(sbio) \*[Le] 0) {
|
||||
\& if(BIO_do_handshake(sbio) <= 0) {
|
||||
\& fprintf(stderr, "Error in SSL handshake\en");
|
||||
\& ERR_print_errors_fp(stderr);
|
||||
\& return 0;
|
||||
@ -472,13 +472,13 @@ a client and also echoes the request to standard output.
|
||||
.Ve
|
||||
.Vb 3
|
||||
\& BIO_puts(sbio, "HTTP/1.0 200 OK\er\enContent-type: text/html\er\en\er\en");
|
||||
\& BIO_puts(sbio, "\*[Lt]pre\*[Gt]\er\enConnection Established\er\enRequest headers:\er\en");
|
||||
\& BIO_puts(sbio, "<pre>\er\enConnection Established\er\enRequest headers:\er\en");
|
||||
\& BIO_puts(sbio, "--------------------------------------------------\er\en");
|
||||
.Ve
|
||||
.Vb 8
|
||||
\& for(;;) {
|
||||
\& len = BIO_gets(sbio, tmpbuf, 1024);
|
||||
\& if(len \*[Le] 0) break;
|
||||
\& if(len <= 0) break;
|
||||
\& BIO_write(sbio, tmpbuf, len);
|
||||
\& BIO_write(out, tmpbuf, len);
|
||||
\& /* Look for blank line signifying end of headers*/
|
||||
@ -487,7 +487,7 @@ a client and also echoes the request to standard output.
|
||||
.Ve
|
||||
.Vb 2
|
||||
\& BIO_puts(sbio, "--------------------------------------------------\er\en");
|
||||
\& BIO_puts(sbio, "\*[Lt]/pre\*[Gt]\er\en");
|
||||
\& BIO_puts(sbio, "</pre>\er\en");
|
||||
.Ve
|
||||
.Vb 2
|
||||
\& /* Since there is a buffering BIO present we had better flush it */
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BIO_find_type.3,v 1.2 2002/02/07 07:00:36 ross Exp $
|
||||
.\" $NetBSD: BIO_find_type.3,v 1.3 2002/06/09 16:12:56 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:39 2001
|
||||
.\" Mon Jun 10 00:55:36 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BIO_find_type 3"
|
||||
.TH BIO_find_type 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BIO_find_type 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BIO_find_type, BIO_next \- \s-1BIO\s0 chain traversal
|
||||
@ -149,14 +149,14 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bio.h\*[Gt]
|
||||
\& #include <openssl/bio.h>
|
||||
.Ve
|
||||
.Vb 2
|
||||
\& BIO * BIO_find_type(BIO *b,int bio_type);
|
||||
\& BIO * BIO_next(BIO *b);
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& #define BIO_method_type(b) ((b)-\*[Gt]method-\*[Gt]type)
|
||||
\& #define BIO_method_type(b) ((b)->method->type)
|
||||
.Ve
|
||||
.Vb 3
|
||||
\& #define BIO_TYPE_NONE 0
|
||||
@ -216,7 +216,7 @@ chain or find multiple matches using \fIBIO_find_type()\fR. Previous versions ha
|
||||
use:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& next = bio-\*[Gt]next_bio;
|
||||
\& next = bio->next_bio;
|
||||
.Ve
|
||||
.SH "BUGS"
|
||||
.IX Header "BUGS"
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BIO_new.3,v 1.2 2002/02/07 07:00:36 ross Exp $
|
||||
.\" $NetBSD: BIO_new.3,v 1.3 2002/06/09 16:12:56 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:39 2001
|
||||
.\" Mon Jun 10 00:55:36 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BIO_new 3"
|
||||
.TH BIO_new 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BIO_new 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BIO_new, BIO_set, BIO_free, BIO_vfree, BIO_free_all \- \s-1BIO\s0 allocation and freeing functions
|
||||
@ -149,7 +149,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bio.h\*[Gt]
|
||||
\& #include <openssl/bio.h>
|
||||
.Ve
|
||||
.Vb 5
|
||||
\& BIO * BIO_new(BIO_METHOD *type);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BIO_new_bio_pair.3,v 1.2 2002/02/07 07:00:37 ross Exp $
|
||||
.\" $NetBSD: BIO_new_bio_pair.3,v 1.3 2002/06/09 16:12:56 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:40 2001
|
||||
.\" Mon Jun 10 00:55:36 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BIO_new_bio_pair 3"
|
||||
.TH BIO_new_bio_pair 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BIO_new_bio_pair 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BIO_new_bio_pair \- create a new \s-1BIO\s0 pair
|
||||
@ -149,7 +149,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bio.h\*[Gt]
|
||||
\& #include <openssl/bio.h>
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& int BIO_new_bio_pair(BIO **bio1, size_t writebuf1, BIO **bio2, size_t writebuf2);
|
||||
@ -189,11 +189,11 @@ without having to go through the SSL-interface.
|
||||
.Vb 9
|
||||
\& application | TLS-engine
|
||||
\& | |
|
||||
\& +----------\*[Gt] SSL_operations()
|
||||
\& +----------> SSL_operations()
|
||||
\& | /\e ||
|
||||
\& | || \e/
|
||||
\& | BIO-pair (internal_bio)
|
||||
\& +----------\*[Lt] BIO-pair (network_bio)
|
||||
\& +----------< BIO-pair (network_bio)
|
||||
\& | |
|
||||
\& socket |
|
||||
.Ve
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BIO_push.3,v 1.2 2002/02/07 07:00:37 ross Exp $
|
||||
.\" $NetBSD: BIO_push.3,v 1.3 2002/06/09 16:12:56 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:40 2001
|
||||
.\" Mon Jun 10 00:55:37 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BIO_push 3"
|
||||
.TH BIO_push 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BIO_push 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BIO_push, BIO_pop \- add and remove BIOs from a chain.
|
||||
@ -149,7 +149,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bio.h\*[Gt]
|
||||
\& #include <openssl/bio.h>
|
||||
.Ve
|
||||
.Vb 2
|
||||
\& BIO * BIO_push(BIO *b,BIO *append);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BIO_read.3,v 1.2 2002/02/07 07:00:37 ross Exp $
|
||||
.\" $NetBSD: BIO_read.3,v 1.3 2002/06/09 16:12:56 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:41 2001
|
||||
.\" Mon Jun 10 00:55:37 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BIO_read 3"
|
||||
.TH BIO_read 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BIO_read 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BIO_read, BIO_write, BIO_gets, BIO_puts \- \s-1BIO\s0 I/O functions
|
||||
@ -149,7 +149,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bio.h\*[Gt]
|
||||
\& #include <openssl/bio.h>
|
||||
.Ve
|
||||
.Vb 4
|
||||
\& int BIO_read(BIO *b, void *buf, int len);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BIO_s_accept.3,v 1.2 2002/02/07 07:00:37 ross Exp $
|
||||
.\" $NetBSD: BIO_s_accept.3,v 1.3 2002/06/09 16:12:56 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:41 2001
|
||||
.\" Mon Jun 10 00:55:37 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BIO_s_accept 3"
|
||||
.TH BIO_s_accept 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BIO_s_accept 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BIO_s_accept, BIO_set_nbio, BIO_set_accept_port, BIO_get_accept_port,
|
||||
@ -151,7 +151,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bio.h\*[Gt]
|
||||
\& #include <openssl/bio.h>
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& BIO_METHOD * BIO_s_accept(void);
|
||||
@ -252,13 +252,13 @@ incoming connection before processing I/O calls. When an accept
|
||||
.PP
|
||||
When a connection is established a new socket \s-1BIO\s0 is created for
|
||||
the connection and appended to the chain. That is the chain is now
|
||||
accept-\*[Gt]socket. This effectively means that attempting I/O on
|
||||
accept->socket. This effectively means that attempting I/O on
|
||||
an initial accept socket will await an incoming connection then
|
||||
perform I/O on it.
|
||||
.PP
|
||||
If any additional BIOs have been set using \fIBIO_set_accept_bios()\fR
|
||||
then they are placed between the socket and the accept \s-1BIO\s0,
|
||||
that is the chain will be accept-\*[Gt]otherbios-\*[Gt]socket.
|
||||
that is the chain will be accept->otherbios->socket.
|
||||
.PP
|
||||
If a server wishes to process multiple connections (as is normally
|
||||
the case) then the accept \s-1BIO\s0 must be made available for further
|
||||
@ -294,7 +294,7 @@ down each and finally closes both down.
|
||||
.Ve
|
||||
.Vb 6
|
||||
\& /* First call to BIO_accept() sets up accept BIO */
|
||||
\& if(BIO_do_accept(abio) \*[Le] 0) {
|
||||
\& if(BIO_do_accept(abio) <= 0) {
|
||||
\& fprintf(stderr, "Error setting up accept\en");
|
||||
\& ERR_print_errors_fp(stderr);
|
||||
\& exit(0);
|
||||
@ -302,7 +302,7 @@ down each and finally closes both down.
|
||||
.Ve
|
||||
.Vb 23
|
||||
\& /* Wait for incoming connection */
|
||||
\& if(BIO_do_accept(abio) \*[Le] 0) {
|
||||
\& if(BIO_do_accept(abio) <= 0) {
|
||||
\& fprintf(stderr, "Error accepting connection\en");
|
||||
\& ERR_print_errors_fp(stderr);
|
||||
\& exit(0);
|
||||
@ -313,7 +313,7 @@ down each and finally closes both down.
|
||||
\& BIO_puts(cbio, "Connection 1: Sending out Data on initial connection\en");
|
||||
\& fprintf(stderr, "Sent out data on connection 1\en");
|
||||
\& /* Wait for another connection */
|
||||
\& if(BIO_do_accept(abio) \*[Le] 0) {
|
||||
\& if(BIO_do_accept(abio) <= 0) {
|
||||
\& fprintf(stderr, "Error accepting connection\en");
|
||||
\& ERR_print_errors_fp(stderr);
|
||||
\& exit(0);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BIO_s_bio.3,v 1.2 2002/02/07 07:00:37 ross Exp $
|
||||
.\" $NetBSD: BIO_s_bio.3,v 1.3 2002/06/09 16:12:56 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:41 2001
|
||||
.\" Mon Jun 10 00:55:38 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BIO_s_bio 3"
|
||||
.TH BIO_s_bio 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BIO_s_bio 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BIO_s_bio, BIO_make_bio_pair, BIO_destroy_bio_pair, BIO_shutdown_wr,
|
||||
@ -152,7 +152,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bio.h\*[Gt]
|
||||
\& #include <openssl/bio.h>
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& BIO_METHOD *BIO_s_bio(void);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BIO_s_connect.3,v 1.2 2002/02/07 07:00:37 ross Exp $
|
||||
.\" $NetBSD: BIO_s_connect.3,v 1.3 2002/06/09 16:12:56 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:42 2001
|
||||
.\" Mon Jun 10 00:55:38 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BIO_s_connect 3"
|
||||
.TH BIO_s_connect 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BIO_s_connect 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BIO_s_connect, BIO_set_conn_hostname, BIO_set_conn_port,
|
||||
@ -152,7 +152,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bio.h\*[Gt]
|
||||
\& #include <openssl/bio.h>
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& BIO_METHOD * BIO_s_connect(void);
|
||||
@ -306,7 +306,7 @@ to retrieve a page and copy the result to standard output.
|
||||
\& ERR_load_crypto_strings();
|
||||
\& cbio = BIO_new_connect("localhost:http");
|
||||
\& out = BIO_new_fp(stdout, BIO_NOCLOSE);
|
||||
\& if(BIO_do_connect(cbio) \*[Le] 0) {
|
||||
\& if(BIO_do_connect(cbio) <= 0) {
|
||||
\& fprintf(stderr, "Error connecting to server\en");
|
||||
\& ERR_print_errors_fp(stderr);
|
||||
\& /* whatever ... */
|
||||
@ -314,7 +314,7 @@ to retrieve a page and copy the result to standard output.
|
||||
\& BIO_puts(cbio, "GET / HTTP/1.0\en\en");
|
||||
\& for(;;) {
|
||||
\& len = BIO_read(cbio, tmpbuf, 1024);
|
||||
\& if(len \*[Le] 0) break;
|
||||
\& if(len <= 0) break;
|
||||
\& BIO_write(out, tmpbuf, len);
|
||||
\& }
|
||||
\& BIO_free(cbio);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BIO_s_fd.3,v 1.2 2002/02/07 07:00:37 ross Exp $
|
||||
.\" $NetBSD: BIO_s_fd.3,v 1.3 2002/06/09 16:12:56 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:42 2001
|
||||
.\" Mon Jun 10 00:55:38 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BIO_s_fd 3"
|
||||
.TH BIO_s_fd 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BIO_s_fd 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BIO_s_fd, BIO_set_fd, BIO_get_fd, BIO_new_fd \- file descriptor \s-1BIO\s0
|
||||
@ -149,7 +149,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bio.h\*[Gt]
|
||||
\& #include <openssl/bio.h>
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& BIO_METHOD * BIO_s_fd(void);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BIO_s_file.3,v 1.2 2002/02/07 07:00:37 ross Exp $
|
||||
.\" $NetBSD: BIO_s_file.3,v 1.3 2002/06/09 16:12:56 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:42 2001
|
||||
.\" Mon Jun 10 00:55:39 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BIO_s_file 3"
|
||||
.TH BIO_s_file 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BIO_s_file 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BIO_s_file, BIO_new_file, BIO_new_fp, BIO_set_fp, BIO_get_fp,
|
||||
@ -151,7 +151,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bio.h\*[Gt]
|
||||
\& #include <openssl/bio.h>
|
||||
.Ve
|
||||
.Vb 3
|
||||
\& BIO_METHOD * BIO_s_file(void);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BIO_s_mem.3,v 1.3 2002/02/07 09:24:08 ross Exp $
|
||||
.\" $NetBSD: BIO_s_mem.3,v 1.4 2002/06/09 16:12:56 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:43 2001
|
||||
.\" Mon Jun 10 00:55:39 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BIO_s_mem 3"
|
||||
.TH BIO_s_mem 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BIO_s_mem 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BIO_s_mem, BIO_set_mem_eof_return, BIO_get_mem_data, BIO_set_mem_buf,
|
||||
@ -150,7 +150,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bio.h\*[Gt]
|
||||
\& #include <openssl/bio.h>
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& BIO_METHOD * BIO_s_mem(void);
|
||||
@ -251,7 +251,7 @@ Extract the \s-1BUF_MEM\s0 structure from a memory \s-1BIO\s0 and then free up t
|
||||
.PP
|
||||
.Vb 4
|
||||
\& BUF_MEM *bptr;
|
||||
\& BIO_get_mem_ptr(mem, \*[Am]bptr);
|
||||
\& BIO_get_mem_ptr(mem, &bptr);
|
||||
\& BIO_set_close(mem, BIO_NOCLOSE); /* So BIO_free() leaves BUF_MEM alone */
|
||||
\& BIO_free(mem);
|
||||
.Ve
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BIO_s_null.3,v 1.2 2002/02/07 07:00:37 ross Exp $
|
||||
.\" $NetBSD: BIO_s_null.3,v 1.3 2002/06/09 16:12:57 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:43 2001
|
||||
.\" Mon Jun 10 00:55:39 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BIO_s_null 3"
|
||||
.TH BIO_s_null 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BIO_s_null 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BIO_s_null \- null data sink
|
||||
@ -149,7 +149,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bio.h\*[Gt]
|
||||
\& #include <openssl/bio.h>
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& BIO_METHOD * BIO_s_null(void);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BIO_s_socket.3,v 1.2 2002/02/07 07:00:37 ross Exp $
|
||||
.\" $NetBSD: BIO_s_socket.3,v 1.3 2002/06/09 16:12:57 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:43 2001
|
||||
.\" Mon Jun 10 00:55:40 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BIO_s_socket 3"
|
||||
.TH BIO_s_socket 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BIO_s_socket 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BIO_s_socket, BIO_new_socket \- socket \s-1BIO\s0
|
||||
@ -149,7 +149,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bio.h\*[Gt]
|
||||
\& #include <openssl/bio.h>
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& BIO_METHOD * BIO_s_socket(void);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BIO_set_callback.3,v 1.2 2002/02/07 07:00:37 ross Exp $
|
||||
.\" $NetBSD: BIO_set_callback.3,v 1.3 2002/06/09 16:12:57 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:44 2001
|
||||
.\" Mon Jun 10 00:55:40 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BIO_set_callback 3"
|
||||
.TH BIO_set_callback 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BIO_set_callback 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BIO_set_callback, BIO_get_callback, BIO_set_callback_arg, BIO_get_callback_arg,
|
||||
@ -150,13 +150,13 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bio.h\*[Gt]
|
||||
\& #include <openssl/bio.h>
|
||||
.Ve
|
||||
.Vb 4
|
||||
\& #define BIO_set_callback(b,cb) ((b)-\*[Gt]callback=(cb))
|
||||
\& #define BIO_get_callback(b) ((b)-\*[Gt]callback)
|
||||
\& #define BIO_set_callback_arg(b,arg) ((b)-\*[Gt]cb_arg=(char *)(arg))
|
||||
\& #define BIO_get_callback_arg(b) ((b)-\*[Gt]cb_arg)
|
||||
\& #define BIO_set_callback(b,cb) ((b)->callback=(cb))
|
||||
\& #define BIO_get_callback(b) ((b)->callback)
|
||||
\& #define BIO_set_callback_arg(b,arg) ((b)->cb_arg=(char *)(arg))
|
||||
\& #define BIO_get_callback_arg(b) ((b)->cb_arg)
|
||||
.Ve
|
||||
.Vb 2
|
||||
\& long BIO_debug_callback(BIO *bio,int cmd,const char *argp,int argi,
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BIO_should_retry.3,v 1.3 2002/02/07 09:24:08 ross Exp $
|
||||
.\" $NetBSD: BIO_should_retry.3,v 1.4 2002/06/09 16:12:57 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:44 2001
|
||||
.\" Mon Jun 10 00:55:40 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BIO_should_retry 3"
|
||||
.TH BIO_should_retry 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BIO_should_retry 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BIO_should_retry, BIO_should_read, BIO_should_write,
|
||||
@ -151,14 +151,14 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bio.h\*[Gt]
|
||||
\& #include <openssl/bio.h>
|
||||
.Ve
|
||||
.Vb 5
|
||||
\& #define BIO_should_read(a) ((a)-\*[Gt]flags \*[Am] BIO_FLAGS_READ)
|
||||
\& #define BIO_should_write(a) ((a)-\*[Gt]flags \*[Am] BIO_FLAGS_WRITE)
|
||||
\& #define BIO_should_io_special(a) ((a)-\*[Gt]flags \*[Am] BIO_FLAGS_IO_SPECIAL)
|
||||
\& #define BIO_retry_type(a) ((a)-\*[Gt]flags \*[Am] BIO_FLAGS_RWS)
|
||||
\& #define BIO_should_retry(a) ((a)-\*[Gt]flags \*[Am] BIO_FLAGS_SHOULD_RETRY)
|
||||
\& #define BIO_should_read(a) ((a)->flags & BIO_FLAGS_READ)
|
||||
\& #define BIO_should_write(a) ((a)->flags & BIO_FLAGS_WRITE)
|
||||
\& #define BIO_should_io_special(a) ((a)->flags & BIO_FLAGS_IO_SPECIAL)
|
||||
\& #define BIO_retry_type(a) ((a)->flags & BIO_FLAGS_RWS)
|
||||
\& #define BIO_should_retry(a) ((a)->flags & BIO_FLAGS_SHOULD_RETRY)
|
||||
.Ve
|
||||
.Vb 5
|
||||
\& #define BIO_FLAGS_READ 0x01
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BN_CTX_new.3,v 1.6 2002/02/07 07:00:37 ross Exp $
|
||||
.\" $NetBSD: BN_CTX_new.3,v 1.7 2002/06/09 16:12:57 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:45 2001
|
||||
.\" Mon Jun 10 00:55:41 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BN_CTX_new 3"
|
||||
.TH BN_CTX_new 3 "0.9.6a" "2000-07-22" "OpenSSL"
|
||||
.TH BN_CTX_new 3 "0.9.6d" "2000-07-22" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BN_CTX_new, BN_CTX_init, BN_CTX_free \- allocate and free \s-1BN_CTX\s0 structures
|
||||
@ -149,7 +149,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bn.h\*[Gt]
|
||||
\& #include <openssl/bn.h>
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& BN_CTX *BN_CTX_new(void);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BN_CTX_start.3,v 1.6 2002/02/07 07:00:37 ross Exp $
|
||||
.\" $NetBSD: BN_CTX_start.3,v 1.7 2002/06/09 16:12:57 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:45 2001
|
||||
.\" Mon Jun 10 00:55:41 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BN_CTX_start 3"
|
||||
.TH BN_CTX_start 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BN_CTX_start 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BN_CTX_start, BN_CTX_get, BN_CTX_end \- use temporary \s-1BIGNUM\s0 variables
|
||||
@ -149,7 +149,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bn.h\*[Gt]
|
||||
\& #include <openssl/bn.h>
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& void BN_CTX_start(BN_CTX *ctx);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BN_add.3,v 1.6 2002/02/07 07:00:37 ross Exp $
|
||||
.\" $NetBSD: BN_add.3,v 1.7 2002/06/09 16:12:57 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:45 2001
|
||||
.\" Mon Jun 10 00:55:41 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BN_add 3"
|
||||
.TH BN_add 3 "0.9.6a" "2000-07-22" "OpenSSL"
|
||||
.TH BN_add 3 "0.9.6d" "2000-07-22" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BN_add, BN_sub, BN_mul, BN_div, BN_sqr, BN_mod, BN_mod_mul, BN_exp,
|
||||
@ -150,7 +150,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bn.h\*[Gt]
|
||||
\& #include <openssl/bn.h>
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BN_add_word.3,v 1.6 2002/02/07 07:00:37 ross Exp $
|
||||
.\" $NetBSD: BN_add_word.3,v 1.7 2002/06/09 16:12:57 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:46 2001
|
||||
.\" Mon Jun 10 00:55:42 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BN_add_word 3"
|
||||
.TH BN_add_word 3 "0.9.6a" "2000-07-22" "OpenSSL"
|
||||
.TH BN_add_word 3 "0.9.6d" "2000-07-22" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BN_add_word, BN_sub_word, BN_mul_word, BN_div_word, BN_mod_word \- arithmetic
|
||||
@ -150,7 +150,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bn.h\*[Gt]
|
||||
\& #include <openssl/bn.h>
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& int BN_add_word(BIGNUM *a, BN_ULONG w);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BN_bn2bin.3,v 1.6 2002/02/07 07:00:38 ross Exp $
|
||||
.\" $NetBSD: BN_bn2bin.3,v 1.7 2002/06/09 16:12:57 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:46 2001
|
||||
.\" Mon Jun 10 00:55:42 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BN_bn2bin 3"
|
||||
.TH BN_bn2bin 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BN_bn2bin 3 "0.9.6d" "2002-06-10" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BN_bn2bin, BN_bin2bn, BN_bn2hex, BN_bn2dec, BN_hex2bn, BN_dec2bn,
|
||||
@ -150,7 +150,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bn.h\*[Gt]
|
||||
\& #include <openssl/bn.h>
|
||||
.Ve
|
||||
.Vb 2
|
||||
\& int BN_bn2bin(const BIGNUM *a, unsigned char *to);
|
||||
@ -196,7 +196,7 @@ with a leading '\-' for negative numbers, to the \fB\s-1BIO\s0\fR or \fB\s-1FILE
|
||||
\&\fBfp\fR.
|
||||
.PP
|
||||
\&\fIBN_bn2mpi()\fR and \fIBN_mpi2bn()\fR convert \fB\s-1BIGNUM\s0\fRs from and to a format
|
||||
that consists of the number's length in bytes represented as a 3\-byte
|
||||
that consists of the number's length in bytes represented as a 4\-byte
|
||||
big-endian number, and the number itself in big-endian format, where
|
||||
the most significant bit signals a negative number (the representation
|
||||
of numbers with the \s-1MSB\s0 set is prefixed with null byte).
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BN_cmp.3,v 1.6 2002/02/07 07:00:38 ross Exp $
|
||||
.\" $NetBSD: BN_cmp.3,v 1.7 2002/06/09 16:12:57 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:46 2001
|
||||
.\" Mon Jun 10 00:55:42 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BN_cmp 3"
|
||||
.TH BN_cmp 3 "0.9.6a" "2000-07-22" "OpenSSL"
|
||||
.TH BN_cmp 3 "0.9.6d" "2000-07-22" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BN_cmp, BN_ucmp, BN_is_zero, BN_is_one, BN_is_word, BN_is_odd \- \s-1BIGNUM\s0 comparison and test functions
|
||||
@ -149,7 +149,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bn.h\*[Gt]
|
||||
\& #include <openssl/bn.h>
|
||||
.Ve
|
||||
.Vb 2
|
||||
\& int BN_cmp(BIGNUM *a, BIGNUM *b);
|
||||
@ -172,8 +172,8 @@ or \fBw\fR respectively. \fIBN_is_odd()\fR tests if a is odd.
|
||||
\&\fIBN_is_zero()\fR, \fIBN_is_one()\fR, \fIBN_is_word()\fR and \fIBN_is_odd()\fR are macros.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fIBN_cmp()\fR returns \-1 if \fBa\fR \*[Lt] \fBb\fR, 0 if \fBa\fR == \fBb\fR and 1 if
|
||||
\&\fBa\fR \*[Gt] \fBb\fR. \fIBN_ucmp()\fR is the same using the absolute values
|
||||
\&\fIBN_cmp()\fR returns \-1 if \fBa\fR < \fBb\fR, 0 if \fBa\fR == \fBb\fR and 1 if
|
||||
\&\fBa\fR > \fBb\fR. \fIBN_ucmp()\fR is the same using the absolute values
|
||||
of \fBa\fR and \fBb\fR.
|
||||
.PP
|
||||
\&\fIBN_is_zero()\fR, \fIBN_is_one()\fR \fIBN_is_word()\fR and \fIBN_is_odd()\fR return 1 if
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BN_copy.3,v 1.6 2002/02/07 07:00:38 ross Exp $
|
||||
.\" $NetBSD: BN_copy.3,v 1.7 2002/06/09 16:12:57 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:47 2001
|
||||
.\" Mon Jun 10 00:55:43 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BN_copy 3"
|
||||
.TH BN_copy 3 "0.9.6a" "2000-07-22" "OpenSSL"
|
||||
.TH BN_copy 3 "0.9.6d" "2000-07-22" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BN_copy, BN_dup \- copy BIGNUMs
|
||||
@ -149,7 +149,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bn.h\*[Gt]
|
||||
\& #include <openssl/bn.h>
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& BIGNUM *BN_copy(BIGNUM *to, const BIGNUM *from);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BN_generate_prime.3,v 1.6 2002/02/07 07:00:38 ross Exp $
|
||||
.\" $NetBSD: BN_generate_prime.3,v 1.7 2002/06/09 16:12:57 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:47 2001
|
||||
.\" Mon Jun 10 00:55:43 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BN_generate_prime 3"
|
||||
.TH BN_generate_prime 3 "0.9.6a" "2000-07-22" "OpenSSL"
|
||||
.TH BN_generate_prime 3 "0.9.6d" "2000-07-22" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BN_generate_prime, BN_is_prime, BN_is_prime_fasttest \- generate primes and test for primality
|
||||
@ -149,7 +149,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bn.h\*[Gt]
|
||||
\& #include <openssl/bn.h>
|
||||
.Ve
|
||||
.Vb 2
|
||||
\& BIGNUM *BN_generate_prime(BIGNUM *ret, int num, int safe, BIGNUM *add,
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BN_mod_inverse.3,v 1.6 2002/02/07 07:00:38 ross Exp $
|
||||
.\" $NetBSD: BN_mod_inverse.3,v 1.7 2002/06/09 16:12:57 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:48 2001
|
||||
.\" Mon Jun 10 00:55:43 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BN_mod_inverse 3"
|
||||
.TH BN_mod_inverse 3 "0.9.6a" "2000-07-22" "OpenSSL"
|
||||
.TH BN_mod_inverse 3 "0.9.6d" "2000-07-22" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BN_mod_inverse \- compute inverse modulo n
|
||||
@ -149,7 +149,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bn.h\*[Gt]
|
||||
\& #include <openssl/bn.h>
|
||||
.Ve
|
||||
.Vb 2
|
||||
\& BIGNUM *BN_mod_inverse(BIGNUM *r, BIGNUM *a, const BIGNUM *n,
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BN_mod_mul_montgomery.3,v 1.6 2002/02/07 07:00:38 ross Exp $
|
||||
.\" $NetBSD: BN_mod_mul_montgomery.3,v 1.7 2002/06/09 16:12:57 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:48 2001
|
||||
.\" Mon Jun 10 00:55:43 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BN_mod_mul_montgomery 3"
|
||||
.TH BN_mod_mul_montgomery 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BN_mod_mul_montgomery 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BN_mod_mul_montgomery, BN_MONT_CTX_new, BN_MONT_CTX_init,
|
||||
@ -151,7 +151,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bn.h\*[Gt]
|
||||
\& #include <openssl/bn.h>
|
||||
.Ve
|
||||
.Vb 3
|
||||
\& BN_MONT_CTX *BN_MONT_CTX_new(void);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BN_mod_mul_reciprocal.3,v 1.6 2002/02/07 07:00:38 ross Exp $
|
||||
.\" $NetBSD: BN_mod_mul_reciprocal.3,v 1.7 2002/06/09 16:12:57 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:48 2001
|
||||
.\" Mon Jun 10 00:55:44 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BN_mod_mul_reciprocal 3"
|
||||
.TH BN_mod_mul_reciprocal 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BN_mod_mul_reciprocal 3 "0.9.6d" "2001-04-12" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BN_mod_mul_reciprocal, BN_div_recp, BN_RECP_CTX_new, BN_RECP_CTX_init,
|
||||
@ -151,7 +151,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bn.h\*[Gt]
|
||||
\& #include <openssl/bn.h>
|
||||
.Ve
|
||||
.Vb 3
|
||||
\& BN_RECP_CTX *BN_RECP_CTX_new(void);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BN_new.3,v 1.6 2002/02/07 07:00:38 ross Exp $
|
||||
.\" $NetBSD: BN_new.3,v 1.7 2002/06/09 16:12:57 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:49 2001
|
||||
.\" Mon Jun 10 00:55:44 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BN_new 3"
|
||||
.TH BN_new 3 "0.9.6a" "2000-07-22" "OpenSSL"
|
||||
.TH BN_new 3 "0.9.6d" "2000-07-22" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BN_new, BN_init, BN_clear, BN_free, BN_clear_free \- allocate and free BIGNUMs
|
||||
@ -149,7 +149,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bn.h\*[Gt]
|
||||
\& #include <openssl/bn.h>
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& BIGNUM *BN_new(void);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BN_num_bytes.3,v 1.6 2002/02/07 07:00:38 ross Exp $
|
||||
.\" $NetBSD: BN_num_bytes.3,v 1.7 2002/06/09 16:12:57 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:49 2001
|
||||
.\" Mon Jun 10 00:55:44 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BN_num_bytes 3"
|
||||
.TH BN_num_bytes 3 "0.9.6a" "2000-07-22" "OpenSSL"
|
||||
.TH BN_num_bytes 3 "0.9.6d" "2000-07-22" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BN_num_bits, BN_num_bytes, BN_num_bits_word \- get \s-1BIGNUM\s0 size
|
||||
@ -149,7 +149,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bn.h\*[Gt]
|
||||
\& #include <openssl/bn.h>
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& int BN_num_bytes(const BIGNUM *a);
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BN_rand.3,v 1.6 2002/02/07 07:00:38 ross Exp $
|
||||
.\" $NetBSD: BN_rand.3,v 1.7 2002/06/09 16:12:57 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:49 2001
|
||||
.\" Mon Jun 10 00:55:45 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BN_rand 3"
|
||||
.TH BN_rand 3 "0.9.6a" "2001-04-12" "OpenSSL"
|
||||
.TH BN_rand 3 "0.9.6d" "2002-06-10" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BN_rand, BN_pseudo_rand \- generate pseudo-random number
|
||||
@ -149,7 +149,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bn.h\*[Gt]
|
||||
\& #include <openssl/bn.h>
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& int BN_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
||||
@ -160,6 +160,9 @@ libcrypto, -lcrypto
|
||||
.Vb 1
|
||||
\& int BN_rand_range(BIGNUM *rnd, BIGNUM *range);
|
||||
.Ve
|
||||
.Vb 1
|
||||
\& int BN_pseudo_rand_range(BIGNUM *rnd, int bits, int top, int bottom);
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fIBN_rand()\fR generates a cryptographically strong pseudo-random number of
|
||||
@ -176,7 +179,9 @@ non-cryptographic purposes and for certain purposes in cryptographic
|
||||
protocols, but usually not for key generation etc.
|
||||
.PP
|
||||
\&\fIBN_rand_range()\fR generates a cryptographically strong pseudo-random
|
||||
number \fBrnd\fR in the range 0 \*[Lt]lt\*[Ge] \fBrnd\fR \*[Lt] \fBrange\fR.
|
||||
number \fBrnd\fR in the range 0 <lt>= \fBrnd\fR < \fBrange\fR.
|
||||
\&\fIBN_pseudo_rand_range()\fR does the same, but is based on \fIBN_pseudo_rand()\fR,
|
||||
and hence numbers generated by it are not necessarily unpredictable.
|
||||
.PP
|
||||
The \s-1PRNG\s0 must be seeded prior to calling \fIBN_rand()\fR or \fIBN_rand_range()\fR.
|
||||
.SH "RETURN VALUES"
|
||||
@ -192,3 +197,4 @@ RAND_add(3), RAND_bytes(3)
|
||||
\&\fIBN_rand()\fR is available in all versions of SSLeay and OpenSSL.
|
||||
\&\fIBN_pseudo_rand()\fR was added in OpenSSL 0.9.5. The \fBtop\fR == \-1 case
|
||||
and the function \fIBN_rand_range()\fR were added in OpenSSL 0.9.6a.
|
||||
\&\fIBN_pseudo_rand_range()\fR was added in OpenSSL 0.9.6c.
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: BN_set_bit.3,v 1.7 2002/02/07 09:24:08 ross Exp $
|
||||
.\" $NetBSD: BN_set_bit.3,v 1.8 2002/06/09 16:12:57 itojun Exp $
|
||||
.\"
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Thu Apr 12 19:26:50 2001
|
||||
.\" Mon Jun 10 00:55:45 2002
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
@ -140,7 +140,7 @@
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title "BN_set_bit 3"
|
||||
.TH BN_set_bit 3 "0.9.6a" "2000-07-22" "OpenSSL"
|
||||
.TH BN_set_bit 3 "0.9.6d" "2000-07-22" "OpenSSL"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
BN_set_bit, BN_clear_bit, BN_is_bit_set, BN_mask_bits, BN_lshift,
|
||||
@ -150,7 +150,7 @@ libcrypto, -lcrypto
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include \*[Lt]openssl/bn.h\*[Gt]
|
||||
\& #include <openssl/bn.h>
|
||||
.Ve
|
||||
.Vb 2
|
||||
\& int BN_set_bit(BIGNUM *a, int n);
|
||||
@ -172,16 +172,16 @@ libcrypto, -lcrypto
|
||||
.Ve
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fIBN_set_bit()\fR sets bit \fBn\fR in \fBa\fR to 1 (\f(CW\*(C`a|=(1\*[Lt]\*[Lt]n)\*(C'\fR). The
|
||||
\&\fIBN_set_bit()\fR sets bit \fBn\fR in \fBa\fR to 1 (\f(CW\*(C`a|=(1<<n)\*(C'\fR). The
|
||||
number is expanded if necessary.
|
||||
.PP
|
||||
\&\fIBN_clear_bit()\fR sets bit \fBn\fR in \fBa\fR to 0 (\f(CW\*(C`a\*[Am]=~(1\*[Lt]\*[Lt]n)\*(C'\fR). An
|
||||
\&\fIBN_clear_bit()\fR sets bit \fBn\fR in \fBa\fR to 0 (\f(CW\*(C`a&=~(1<<n)\*(C'\fR). An
|
||||
error occurs if \fBa\fR is shorter than \fBn\fR bits.
|
||||
.PP
|
||||
\&\fIBN_is_bit_set()\fR tests if bit \fBn\fR in \fBa\fR is set.
|
||||
.PP
|
||||
\&\fIBN_mask_bits()\fR truncates \fBa\fR to an \fBn\fR bit number
|
||||
(\f(CW\*(C`a\*[Am]=~((~0)\*[Gt]\*[Gt]n)\*(C'\fR). An error occurs if \fBa\fR already is
|
||||
(\f(CW\*(C`a&=~((~0)>>n)\*(C'\fR). An error occurs if \fBa\fR already is
|
||||
shorter than \fBn\fR bits.
|
||||
.PP
|
||||
\&\fIBN_lshift()\fR shifts \fBa\fR left by \fBn\fR bits and places the result in
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user