summaryrefslogtreecommitdiff
path: root/src/lib/libssl
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl')
-rw-r--r--src/lib/libssl/src/doc/crypto/CONF_modules_free.pod47
-rw-r--r--src/lib/libssl/src/doc/crypto/CONF_modules_load_file.pod60
-rw-r--r--src/lib/libssl/src/doc/crypto/CRYPTO_set_ex_data.pod56
-rw-r--r--src/lib/libssl/src/doc/crypto/CRYPTO_set_locking_callback.pod210
-rw-r--r--src/lib/libssl/src/doc/crypto/crypto.pod85
5 files changed, 0 insertions, 458 deletions
diff --git a/src/lib/libssl/src/doc/crypto/CONF_modules_free.pod b/src/lib/libssl/src/doc/crypto/CONF_modules_free.pod
deleted file mode 100644
index 803b2faab1..0000000000
--- a/src/lib/libssl/src/doc/crypto/CONF_modules_free.pod
+++ /dev/null
@@ -1,47 +0,0 @@
1=pod
2
3=head1 NAME
4
5CONF_modules_free, CONF_modules_finish, CONF_modules_unload - OpenSSL
6configuration cleanup functions
7
8=head1 SYNOPSIS
9
10 #include <openssl/conf.h>
11
12 void CONF_modules_free(void);
13 void CONF_modules_finish(void);
14 void CONF_modules_unload(int all);
15
16=head1 DESCRIPTION
17
18CONF_modules_free() closes down and frees up all memory allocated by all
19configuration modules.
20
21CONF_modules_finish() calls each configuration modules B<finish> handler
22to free up any configuration that module may have performed.
23
24CONF_modules_unload() finishes and unloads configuration modules. If
25B<all> is set to B<0> only modules loaded from DSOs will be unloads. If
26B<all> is B<1> all modules, including builtin modules will be unloaded.
27
28=head1 NOTES
29
30Normally applications will only call CONF_modules_free() at application to
31tidy up any configuration performed.
32
33=head1 RETURN VALUE
34
35None of the functions return a value.
36
37=head1 SEE ALSO
38
39L<conf(5)|conf(5)>, L<OPENSSL_config(3)|OPENSSL_config(3)>,
40L<CONF_modules_load_file(3)|CONF_modules_load_file(3)>
41
42=head1 HISTORY
43
44CONF_modules_free(), CONF_modules_unload(), and CONF_modules_finish()
45first appeared in OpenSSL 0.9.7.
46
47=cut
diff --git a/src/lib/libssl/src/doc/crypto/CONF_modules_load_file.pod b/src/lib/libssl/src/doc/crypto/CONF_modules_load_file.pod
deleted file mode 100644
index e663ac5bc9..0000000000
--- a/src/lib/libssl/src/doc/crypto/CONF_modules_load_file.pod
+++ /dev/null
@@ -1,60 +0,0 @@
1=pod
2
3=head1 NAME
4
5CONF_modules_load_file, CONF_modules_load - OpenSSL configuration functions
6
7=head1 SYNOPSIS
8
9 #include <openssl/conf.h>
10
11 int CONF_modules_load_file(const char *filename, const char *appname,
12 unsigned long flags);
13 int CONF_modules_load(const CONF *cnf, const char *appname,
14 unsigned long flags);
15
16=head1 DESCRIPTION
17
18The function CONF_modules_load_file() configures OpenSSL using file
19B<filename> and application name B<appname>. If B<filename> is NULL
20the standard OpenSSL configuration file is used. If B<appname> is
21NULL the standard OpenSSL application name B<openssl_conf> is used.
22The behaviour can be customized using B<flags>.
23
24CONF_modules_load() is identical to CONF_modules_load_file() except it
25read configuration information from B<cnf>.
26
27=head1 NOTES
28
29The following B<flags> are currently recognized:
30
31B<CONF_MFLAGS_IGNORE_ERRORS> if set errors returned by individual
32configuration modules are ignored. If not set the first module error is
33considered fatal and no further modules are loads.
34
35Normally any modules errors will add error information to the error queue. If
36B<CONF_MFLAGS_SILENT> is set no error information is added.
37
38If B<CONF_MFLAGS_NO_DSO> is set configuration module loading from DSOs is
39disabled.
40
41B<CONF_MFLAGS_IGNORE_MISSING_FILE> if set will make CONF_load_modules_file()
42ignore missing configuration files. Normally a missing configuration file
43return an error.
44
45=head1 RETURN VALUE
46
47These functions return 1 for success and a zero or negative value for
48failure. If module errors are not ignored the return code will reflect the
49return value of the failing module (this will always be zero or negative).
50
51=head1 SEE ALSO
52
53L<conf(5)|conf(5)>, L<OPENSSL_config(3)|OPENSSL_config(3)>,
54L<CONF_free(3)|CONF_free(3)>, L<err(3)|err(3)>
55
56=head1 HISTORY
57
58CONF_modules_load_file and CONF_modules_load first appeared in OpenSSL 0.9.7.
59
60=cut
diff --git a/src/lib/libssl/src/doc/crypto/CRYPTO_set_ex_data.pod b/src/lib/libssl/src/doc/crypto/CRYPTO_set_ex_data.pod
deleted file mode 100644
index 0c8b378854..0000000000
--- a/src/lib/libssl/src/doc/crypto/CRYPTO_set_ex_data.pod
+++ /dev/null
@@ -1,56 +0,0 @@
1=pod
2
3=head1 NAME
4
5CRYPTO_set_ex_data, CRYPTO_get_ex_data - internal application specific data
6functions
7
8=head1 SYNOPSIS
9
10 #include <openssl/crypto.h>
11
12 int CRYPTO_set_ex_data(CRYPTO_EX_DATA *r, int idx, void *arg);
13
14 void *CRYPTO_get_ex_data(CRYPTO_EX_DATA *r, int idx);
15
16=head1 DESCRIPTION
17
18Several OpenSSL structures can have application specific data attached to them.
19These functions are used internally by OpenSSL to manipulate application
20specific data attached to a specific structure.
21
22These functions should only be used by applications to manipulate
23B<CRYPTO_EX_DATA> structures passed to the B<new_func()>, B<free_func()> and
24B<dup_func()> callbacks: as passed to B<RSA_get_ex_new_index()> for example.
25
26B<CRYPTO_set_ex_data()> is used to set application specific data, the data is
27supplied in the B<arg> parameter and its precise meaning is up to the
28application.
29
30B<CRYPTO_get_ex_data()> is used to retrieve application specific data. The data
31is returned to the application, this will be the same value as supplied to
32a previous B<CRYPTO_set_ex_data()> call.
33
34=head1 RETURN VALUES
35
36B<CRYPTO_set_ex_data()> returns 1 on success or 0 on failure.
37
38B<CRYPTO_get_ex_data()> returns the application data or 0 on failure. 0 may
39also be valid application data but currently it can only fail if given an
40invalid B<idx> parameter.
41
42On failure an error code can be obtained from
43L<ERR_get_error(3)|ERR_get_error(3)>.
44
45=head1 SEE ALSO
46
47L<RSA_get_ex_new_index(3)|RSA_get_ex_new_index(3)>,
48L<DSA_get_ex_new_index(3)|DSA_get_ex_new_index(3)>,
49L<DH_get_ex_new_index(3)|DH_get_ex_new_index(3)>
50
51=head1 HISTORY
52
53CRYPTO_set_ex_data() and CRYPTO_get_ex_data() have been available since SSLeay
540.9.0.
55
56=cut
diff --git a/src/lib/libssl/src/doc/crypto/CRYPTO_set_locking_callback.pod b/src/lib/libssl/src/doc/crypto/CRYPTO_set_locking_callback.pod
deleted file mode 100644
index 8f4cf4cb2d..0000000000
--- a/src/lib/libssl/src/doc/crypto/CRYPTO_set_locking_callback.pod
+++ /dev/null
@@ -1,210 +0,0 @@
1=pod
2
3=head1 NAME
4
5CRYPTO_THREADID_set_callback, CRYPTO_THREADID_get_callback,
6CRYPTO_THREADID_current, CRYPTO_THREADID_cmp, CRYPTO_THREADID_cpy,
7CRYPTO_THREADID_hash, CRYPTO_set_locking_callback, CRYPTO_num_locks,
8CRYPTO_set_dynlock_create_callback, CRYPTO_set_dynlock_lock_callback,
9CRYPTO_set_dynlock_destroy_callback, CRYPTO_get_new_dynlockid,
10CRYPTO_destroy_dynlockid, CRYPTO_lock - OpenSSL thread support
11
12=head1 SYNOPSIS
13
14 #include <openssl/crypto.h>
15
16 /* Don't use this structure directly. */
17 typedef struct crypto_threadid_st
18 {
19 void *ptr;
20 unsigned long val;
21 } CRYPTO_THREADID;
22 /* Only use CRYPTO_THREADID_set_[numeric|pointer]() within callbacks */
23 void CRYPTO_THREADID_set_numeric(CRYPTO_THREADID *id, unsigned long val);
24 void CRYPTO_THREADID_set_pointer(CRYPTO_THREADID *id, void *ptr);
25 int CRYPTO_THREADID_set_callback(void (*threadid_func)(CRYPTO_THREADID *));
26 void (*CRYPTO_THREADID_get_callback(void))(CRYPTO_THREADID *);
27 void CRYPTO_THREADID_current(CRYPTO_THREADID *id);
28 int CRYPTO_THREADID_cmp(const CRYPTO_THREADID *a,
29 const CRYPTO_THREADID *b);
30 void CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest,
31 const CRYPTO_THREADID *src);
32 unsigned long CRYPTO_THREADID_hash(const CRYPTO_THREADID *id);
33
34 int CRYPTO_num_locks(void);
35
36 /* struct CRYPTO_dynlock_value needs to be defined by the user */
37 struct CRYPTO_dynlock_value;
38
39 void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value *
40 (*dyn_create_function)(char *file, int line));
41 void CRYPTO_set_dynlock_lock_callback(void (*dyn_lock_function)
42 (int mode, struct CRYPTO_dynlock_value *l,
43 const char *file, int line));
44 void CRYPTO_set_dynlock_destroy_callback(void (*dyn_destroy_function)
45 (struct CRYPTO_dynlock_value *l, const char *file, int line));
46
47 int CRYPTO_get_new_dynlockid(void);
48
49 void CRYPTO_destroy_dynlockid(int i);
50
51 void CRYPTO_lock(int mode, int n, const char *file, int line);
52
53 #define CRYPTO_w_lock(type) \
54 CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE,type,__FILE__,__LINE__)
55 #define CRYPTO_w_unlock(type) \
56 CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE,type,__FILE__,__LINE__)
57 #define CRYPTO_r_lock(type) \
58 CRYPTO_lock(CRYPTO_LOCK|CRYPTO_READ,type,__FILE__,__LINE__)
59 #define CRYPTO_r_unlock(type) \
60 CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_READ,type,__FILE__,__LINE__)
61 #define CRYPTO_add(addr,amount,type) \
62 CRYPTO_add_lock(addr,amount,type,__FILE__,__LINE__)
63
64=head1 DESCRIPTION
65
66OpenSSL can safely be used in multi-threaded applications provided
67that at least two callback functions are set, locking_function and
68threadid_func.
69
70locking_function(int mode, int n, const char *file, int line) is
71needed to perform locking on shared data structures.
72(Note that OpenSSL uses a number of global data structures that
73will be implicitly shared whenever multiple threads use OpenSSL.)
74Multi-threaded applications will crash at random if it is not set.
75
76locking_function() must be able to handle up to CRYPTO_num_locks()
77different mutex locks. It sets the B<n>-th lock if B<mode> &
78B<CRYPTO_LOCK>, and releases it otherwise.
79
80B<file> and B<line> are the file number of the function setting the
81lock. They can be useful for debugging.
82
83threadid_func(CRYPTO_THREADID *id) is needed to record the currently-executing
84thread's identifier into B<id>. The implementation of this callback should not
85fill in B<id> directly, but should use CRYPTO_THREADID_set_numeric() if thread
86IDs are numeric, or CRYPTO_THREADID_set_pointer() if they are pointer-based.
87If the application does not register such a callback using
88CRYPTO_THREADID_set_callback(), then a default implementation is used - on
89Windows and BeOS this uses the system's default thread identifying APIs, and on
90all other platforms it uses the address of B<errno>. The latter is satisfactory
91for thread-safety if and only if the platform has a thread-local error number
92facility.
93
94Once threadid_func() is registered, or if the built-in default implementation is
95to be used;
96
97=over 4
98
99=item *
100CRYPTO_THREADID_current() records the currently-executing thread ID into the
101given B<id> object.
102
103=item *
104CRYPTO_THREADID_cmp() compares two thread IDs (returning zero for equality, ie.
105the same semantics as memcmp()).
106
107=item *
108CRYPTO_THREADID_cpy() duplicates a thread ID value,
109
110=item *
111CRYPTO_THREADID_hash() returns a numeric value usable as a hash-table key. This
112is usually the exact numeric or pointer-based thread ID used internally, however
113this also handles the unusual case where pointers are larger than 'long'
114variables and the platform's thread IDs are pointer-based - in this case, mixing
115is done to attempt to produce a unique numeric value even though it is not as
116wide as the platform's true thread IDs.
117
118=back
119
120Additionally, OpenSSL supports dynamic locks, and sometimes, some parts
121of OpenSSL need it for better performance. To enable this, the following
122is required:
123
124=over 4
125
126=item *
127Three additional callback function, dyn_create_function, dyn_lock_function
128and dyn_destroy_function.
129
130=item *
131A structure defined with the data that each lock needs to handle.
132
133=back
134
135struct CRYPTO_dynlock_value has to be defined to contain whatever structure
136is needed to handle locks.
137
138dyn_create_function(const char *file, int line) is needed to create a
139lock. Multi-threaded applications might crash at random if it is not set.
140
141dyn_lock_function(int mode, CRYPTO_dynlock *l, const char *file, int line)
142is needed to perform locking off dynamic lock numbered n. Multi-threaded
143applications might crash at random if it is not set.
144
145dyn_destroy_function(CRYPTO_dynlock *l, const char *file, int line) is
146needed to destroy the lock l. Multi-threaded applications might crash at
147random if it is not set.
148
149CRYPTO_get_new_dynlockid() is used to create locks. It will call
150dyn_create_function for the actual creation.
151
152CRYPTO_destroy_dynlockid() is used to destroy locks. It will call
153dyn_destroy_function for the actual destruction.
154
155CRYPTO_lock() is used to lock and unlock the locks. mode is a bitfield
156describing what should be done with the lock. n is the number of the
157lock as returned from CRYPTO_get_new_dynlockid(). mode can be combined
158from the following values. These values are pairwise exclusive, with
159undefined behaviour if misused (for example, CRYPTO_READ and CRYPTO_WRITE
160should not be used together):
161
162 CRYPTO_LOCK 0x01
163 CRYPTO_UNLOCK 0x02
164 CRYPTO_READ 0x04
165 CRYPTO_WRITE 0x08
166
167=head1 RETURN VALUES
168
169CRYPTO_num_locks() returns the required number of locks.
170
171CRYPTO_get_new_dynlockid() returns the index to the newly created lock.
172
173The other functions return no values.
174
175=head1 NOTES
176
177You can find out if OpenSSL was configured with thread support:
178
179 #define OPENSSL_THREAD_DEFINES
180 #include <openssl/opensslconf.h>
181 #if defined(OPENSSL_THREADS)
182 // thread support enabled
183 #else
184 // no thread support
185 #endif
186
187Also, dynamic locks are currently not used internally by OpenSSL, but
188may do so in the future.
189
190=head1 EXAMPLES
191
192B<crypto/threads/mttest.c> shows examples of the callback functions on
193Solaris, Irix and Win32.
194
195=head1 HISTORY
196
197CRYPTO_set_locking_callback() is
198available in all versions of SSLeay and OpenSSL.
199CRYPTO_num_locks() was added in OpenSSL 0.9.4.
200All functions dealing with dynamic locks were added in OpenSSL 0.9.5b-dev.
201B<CRYPTO_THREADID> and associated functions were introduced in OpenSSL 1.0.0
202to replace (actually, deprecate) the previous CRYPTO_set_id_callback(),
203CRYPTO_get_id_callback(), and CRYPTO_thread_id() functions which assumed
204thread IDs to always be represented by 'unsigned long'.
205
206=head1 SEE ALSO
207
208L<crypto(3)|crypto(3)>
209
210=cut
diff --git a/src/lib/libssl/src/doc/crypto/crypto.pod b/src/lib/libssl/src/doc/crypto/crypto.pod
deleted file mode 100644
index bbd6ce9ea9..0000000000
--- a/src/lib/libssl/src/doc/crypto/crypto.pod
+++ /dev/null
@@ -1,85 +0,0 @@
1=pod
2
3=head1 NAME
4
5crypto - OpenSSL cryptographic library
6
7=head1 SYNOPSIS
8
9=head1 DESCRIPTION
10
11The OpenSSL B<crypto> library implements a wide range of cryptographic
12algorithms used in various Internet standards. The services provided
13by this library are used by the OpenSSL implementations of SSL, TLS
14and S/MIME, and they have also been used to implement SSH, OpenPGP, and
15other cryptographic standards.
16
17=head1 OVERVIEW
18
19B<libcrypto> consists of a number of sub-libraries that implement the
20individual algorithms.
21
22The functionality includes symmetric encryption, public key
23cryptography and key agreement, certificate handling, cryptographic
24hash functions and a cryptographic pseudo-random number generator.
25
26=over 4
27
28=item SYMMETRIC CIPHERS
29
30L<blowfish(3)|blowfish(3)>, L<cast(3)|cast(3)>, L<des(3)|des(3)>,
31L<idea(3)|idea(3)>, L<rc2(3)|rc2(3)>, L<rc4(3)|rc4(3)>, L<rc5(3)|rc5(3)>
32
33=item PUBLIC KEY CRYPTOGRAPHY AND KEY AGREEMENT
34
35L<dsa(3)|dsa(3)>, L<dh(3)|dh(3)>, L<rsa(3)|rsa(3)>
36
37=item CERTIFICATES
38
39L<x509(3)|x509(3)>, L<x509v3(3)|x509v3(3)>
40
41=item AUTHENTICATION CODES, HASH FUNCTIONS
42
43L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, L<md4(3)|md4(3)>,
44L<md5(3)|md5(3)>, L<ripemd(3)|ripemd(3)>,
45L<sha(3)|sha(3)>
46
47=item AUXILIARY FUNCTIONS
48
49L<err(3)|err(3)>, L<threads(3)|threads(3)>, L<rand(3)|rand(3)>,
50L<OPENSSL_VERSION_NUMBER(3)|OPENSSL_VERSION_NUMBER(3)>
51
52=item INPUT/OUTPUT, DATA ENCODING
53
54L<asn1(3)|asn1(3)>, L<bio(3)|bio(3)>, L<evp(3)|evp(3)>, L<pem(3)|pem(3)>,
55L<pkcs7(3)|pkcs7(3)>, L<pkcs12(3)|pkcs12(3)>
56
57=item INTERNAL FUNCTIONS
58
59L<bn(3)|bn(3)>, L<buffer(3)|buffer(3)>, L<ec(3)|ec(3)>, L<lhash(3)|lhash(3)>,
60L<objects(3)|objects(3)>, L<stack(3)|stack(3)>,
61L<txt_db(3)|txt_db(3)>
62
63=back
64
65=head1 NOTES
66
67Some of the newer functions follow a naming convention using the numbers
68B<0> and B<1>. For example the functions:
69
70 int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
71 int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj);
72
73The B<0> version uses the supplied structure pointer directly
74in the parent and it will be freed up when the parent is freed.
75In the above example B<crl> would be freed but B<rev> would not.
76
77The B<1> function uses a copy of the supplied structure pointer
78(or in some cases increases its link count) in the parent and
79so both (B<x> and B<obj> above) should be freed up.
80
81=head1 SEE ALSO
82
83L<openssl(1)|openssl(1)>, L<ssl(3)|ssl(3)>
84
85=cut