ring-native 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/Gemfile +3 -0
- data/README.md +22 -0
- data/Rakefile +1 -0
- data/ext/ring/extconf.rb +29 -0
- data/lib/ring/native.rb +8 -0
- data/lib/ring/native/version.rb +5 -0
- data/ring-native.gemspec +25 -0
- data/vendor/ring/BUILDING.md +40 -0
- data/vendor/ring/Cargo.toml +43 -0
- data/vendor/ring/LICENSE +185 -0
- data/vendor/ring/Makefile +35 -0
- data/vendor/ring/PORTING.md +163 -0
- data/vendor/ring/README.md +113 -0
- data/vendor/ring/STYLE.md +197 -0
- data/vendor/ring/appveyor.yml +27 -0
- data/vendor/ring/build.rs +108 -0
- data/vendor/ring/crypto/aes/aes.c +1142 -0
- data/vendor/ring/crypto/aes/aes_test.Windows.vcxproj +25 -0
- data/vendor/ring/crypto/aes/aes_test.cc +93 -0
- data/vendor/ring/crypto/aes/asm/aes-586.pl +2368 -0
- data/vendor/ring/crypto/aes/asm/aes-armv4.pl +1249 -0
- data/vendor/ring/crypto/aes/asm/aes-x86_64.pl +2246 -0
- data/vendor/ring/crypto/aes/asm/aesni-x86.pl +1318 -0
- data/vendor/ring/crypto/aes/asm/aesni-x86_64.pl +2084 -0
- data/vendor/ring/crypto/aes/asm/aesv8-armx.pl +675 -0
- data/vendor/ring/crypto/aes/asm/bsaes-armv7.pl +1364 -0
- data/vendor/ring/crypto/aes/asm/bsaes-x86_64.pl +1565 -0
- data/vendor/ring/crypto/aes/asm/vpaes-x86.pl +841 -0
- data/vendor/ring/crypto/aes/asm/vpaes-x86_64.pl +1116 -0
- data/vendor/ring/crypto/aes/internal.h +87 -0
- data/vendor/ring/crypto/aes/mode_wrappers.c +61 -0
- data/vendor/ring/crypto/bn/add.c +394 -0
- data/vendor/ring/crypto/bn/asm/armv4-mont.pl +694 -0
- data/vendor/ring/crypto/bn/asm/armv8-mont.pl +1503 -0
- data/vendor/ring/crypto/bn/asm/bn-586.pl +774 -0
- data/vendor/ring/crypto/bn/asm/co-586.pl +287 -0
- data/vendor/ring/crypto/bn/asm/rsaz-avx2.pl +1882 -0
- data/vendor/ring/crypto/bn/asm/x86-mont.pl +592 -0
- data/vendor/ring/crypto/bn/asm/x86_64-gcc.c +599 -0
- data/vendor/ring/crypto/bn/asm/x86_64-mont.pl +1393 -0
- data/vendor/ring/crypto/bn/asm/x86_64-mont5.pl +3507 -0
- data/vendor/ring/crypto/bn/bn.c +352 -0
- data/vendor/ring/crypto/bn/bn_asn1.c +74 -0
- data/vendor/ring/crypto/bn/bn_test.Windows.vcxproj +25 -0
- data/vendor/ring/crypto/bn/bn_test.cc +1696 -0
- data/vendor/ring/crypto/bn/cmp.c +200 -0
- data/vendor/ring/crypto/bn/convert.c +433 -0
- data/vendor/ring/crypto/bn/ctx.c +311 -0
- data/vendor/ring/crypto/bn/div.c +594 -0
- data/vendor/ring/crypto/bn/exponentiation.c +1335 -0
- data/vendor/ring/crypto/bn/gcd.c +711 -0
- data/vendor/ring/crypto/bn/generic.c +1019 -0
- data/vendor/ring/crypto/bn/internal.h +316 -0
- data/vendor/ring/crypto/bn/montgomery.c +516 -0
- data/vendor/ring/crypto/bn/mul.c +888 -0
- data/vendor/ring/crypto/bn/prime.c +829 -0
- data/vendor/ring/crypto/bn/random.c +334 -0
- data/vendor/ring/crypto/bn/rsaz_exp.c +262 -0
- data/vendor/ring/crypto/bn/rsaz_exp.h +53 -0
- data/vendor/ring/crypto/bn/shift.c +276 -0
- data/vendor/ring/crypto/bytestring/bytestring_test.Windows.vcxproj +25 -0
- data/vendor/ring/crypto/bytestring/bytestring_test.cc +421 -0
- data/vendor/ring/crypto/bytestring/cbb.c +399 -0
- data/vendor/ring/crypto/bytestring/cbs.c +227 -0
- data/vendor/ring/crypto/bytestring/internal.h +46 -0
- data/vendor/ring/crypto/chacha/chacha_generic.c +140 -0
- data/vendor/ring/crypto/chacha/chacha_vec.c +323 -0
- data/vendor/ring/crypto/chacha/chacha_vec_arm.S +1447 -0
- data/vendor/ring/crypto/chacha/chacha_vec_arm_generate.go +153 -0
- data/vendor/ring/crypto/cipher/cipher_test.Windows.vcxproj +25 -0
- data/vendor/ring/crypto/cipher/e_aes.c +390 -0
- data/vendor/ring/crypto/cipher/e_chacha20poly1305.c +208 -0
- data/vendor/ring/crypto/cipher/internal.h +173 -0
- data/vendor/ring/crypto/cipher/test/aes_128_gcm_tests.txt +543 -0
- data/vendor/ring/crypto/cipher/test/aes_128_key_wrap_tests.txt +9 -0
- data/vendor/ring/crypto/cipher/test/aes_256_gcm_tests.txt +475 -0
- data/vendor/ring/crypto/cipher/test/aes_256_key_wrap_tests.txt +23 -0
- data/vendor/ring/crypto/cipher/test/chacha20_poly1305_old_tests.txt +422 -0
- data/vendor/ring/crypto/cipher/test/chacha20_poly1305_tests.txt +484 -0
- data/vendor/ring/crypto/cipher/test/cipher_test.txt +100 -0
- data/vendor/ring/crypto/constant_time_test.Windows.vcxproj +25 -0
- data/vendor/ring/crypto/constant_time_test.c +304 -0
- data/vendor/ring/crypto/cpu-arm-asm.S +32 -0
- data/vendor/ring/crypto/cpu-arm.c +199 -0
- data/vendor/ring/crypto/cpu-intel.c +261 -0
- data/vendor/ring/crypto/crypto.c +151 -0
- data/vendor/ring/crypto/curve25519/asm/x25519-arm.S +2118 -0
- data/vendor/ring/crypto/curve25519/curve25519.c +4888 -0
- data/vendor/ring/crypto/curve25519/x25519_test.cc +128 -0
- data/vendor/ring/crypto/digest/md32_common.h +181 -0
- data/vendor/ring/crypto/ec/asm/p256-x86_64-asm.pl +2725 -0
- data/vendor/ring/crypto/ec/ec.c +193 -0
- data/vendor/ring/crypto/ec/ec_curves.c +61 -0
- data/vendor/ring/crypto/ec/ec_key.c +228 -0
- data/vendor/ring/crypto/ec/ec_montgomery.c +114 -0
- data/vendor/ring/crypto/ec/example_mul.Windows.vcxproj +25 -0
- data/vendor/ring/crypto/ec/internal.h +243 -0
- data/vendor/ring/crypto/ec/oct.c +253 -0
- data/vendor/ring/crypto/ec/p256-64.c +1794 -0
- data/vendor/ring/crypto/ec/p256-x86_64-table.h +9548 -0
- data/vendor/ring/crypto/ec/p256-x86_64.c +509 -0
- data/vendor/ring/crypto/ec/simple.c +1007 -0
- data/vendor/ring/crypto/ec/util-64.c +183 -0
- data/vendor/ring/crypto/ec/wnaf.c +508 -0
- data/vendor/ring/crypto/ecdh/ecdh.c +155 -0
- data/vendor/ring/crypto/ecdsa/ecdsa.c +304 -0
- data/vendor/ring/crypto/ecdsa/ecdsa_asn1.c +193 -0
- data/vendor/ring/crypto/ecdsa/ecdsa_test.Windows.vcxproj +25 -0
- data/vendor/ring/crypto/ecdsa/ecdsa_test.cc +327 -0
- data/vendor/ring/crypto/header_removed.h +17 -0
- data/vendor/ring/crypto/internal.h +495 -0
- data/vendor/ring/crypto/libring.Windows.vcxproj +101 -0
- data/vendor/ring/crypto/mem.c +98 -0
- data/vendor/ring/crypto/modes/asm/aesni-gcm-x86_64.pl +1045 -0
- data/vendor/ring/crypto/modes/asm/ghash-armv4.pl +517 -0
- data/vendor/ring/crypto/modes/asm/ghash-x86.pl +1393 -0
- data/vendor/ring/crypto/modes/asm/ghash-x86_64.pl +1741 -0
- data/vendor/ring/crypto/modes/asm/ghashv8-armx.pl +422 -0
- data/vendor/ring/crypto/modes/ctr.c +226 -0
- data/vendor/ring/crypto/modes/gcm.c +1206 -0
- data/vendor/ring/crypto/modes/gcm_test.Windows.vcxproj +25 -0
- data/vendor/ring/crypto/modes/gcm_test.c +348 -0
- data/vendor/ring/crypto/modes/internal.h +299 -0
- data/vendor/ring/crypto/perlasm/arm-xlate.pl +170 -0
- data/vendor/ring/crypto/perlasm/readme +100 -0
- data/vendor/ring/crypto/perlasm/x86_64-xlate.pl +1164 -0
- data/vendor/ring/crypto/perlasm/x86asm.pl +292 -0
- data/vendor/ring/crypto/perlasm/x86gas.pl +263 -0
- data/vendor/ring/crypto/perlasm/x86masm.pl +200 -0
- data/vendor/ring/crypto/perlasm/x86nasm.pl +187 -0
- data/vendor/ring/crypto/poly1305/poly1305.c +331 -0
- data/vendor/ring/crypto/poly1305/poly1305_arm.c +301 -0
- data/vendor/ring/crypto/poly1305/poly1305_arm_asm.S +2015 -0
- data/vendor/ring/crypto/poly1305/poly1305_test.Windows.vcxproj +25 -0
- data/vendor/ring/crypto/poly1305/poly1305_test.cc +80 -0
- data/vendor/ring/crypto/poly1305/poly1305_test.txt +52 -0
- data/vendor/ring/crypto/poly1305/poly1305_vec.c +892 -0
- data/vendor/ring/crypto/rand/asm/rdrand-x86_64.pl +75 -0
- data/vendor/ring/crypto/rand/internal.h +32 -0
- data/vendor/ring/crypto/rand/rand.c +189 -0
- data/vendor/ring/crypto/rand/urandom.c +219 -0
- data/vendor/ring/crypto/rand/windows.c +56 -0
- data/vendor/ring/crypto/refcount_c11.c +66 -0
- data/vendor/ring/crypto/refcount_lock.c +53 -0
- data/vendor/ring/crypto/refcount_test.Windows.vcxproj +25 -0
- data/vendor/ring/crypto/refcount_test.c +58 -0
- data/vendor/ring/crypto/rsa/blinding.c +462 -0
- data/vendor/ring/crypto/rsa/internal.h +108 -0
- data/vendor/ring/crypto/rsa/padding.c +300 -0
- data/vendor/ring/crypto/rsa/rsa.c +450 -0
- data/vendor/ring/crypto/rsa/rsa_asn1.c +261 -0
- data/vendor/ring/crypto/rsa/rsa_impl.c +944 -0
- data/vendor/ring/crypto/rsa/rsa_test.Windows.vcxproj +25 -0
- data/vendor/ring/crypto/rsa/rsa_test.cc +437 -0
- data/vendor/ring/crypto/sha/asm/sha-armv8.pl +436 -0
- data/vendor/ring/crypto/sha/asm/sha-x86_64.pl +2390 -0
- data/vendor/ring/crypto/sha/asm/sha256-586.pl +1275 -0
- data/vendor/ring/crypto/sha/asm/sha256-armv4.pl +735 -0
- data/vendor/ring/crypto/sha/asm/sha256-armv8.pl +14 -0
- data/vendor/ring/crypto/sha/asm/sha256-x86_64.pl +14 -0
- data/vendor/ring/crypto/sha/asm/sha512-586.pl +911 -0
- data/vendor/ring/crypto/sha/asm/sha512-armv4.pl +666 -0
- data/vendor/ring/crypto/sha/asm/sha512-armv8.pl +14 -0
- data/vendor/ring/crypto/sha/asm/sha512-x86_64.pl +14 -0
- data/vendor/ring/crypto/sha/sha1.c +271 -0
- data/vendor/ring/crypto/sha/sha256.c +204 -0
- data/vendor/ring/crypto/sha/sha512.c +355 -0
- data/vendor/ring/crypto/test/file_test.cc +326 -0
- data/vendor/ring/crypto/test/file_test.h +181 -0
- data/vendor/ring/crypto/test/malloc.cc +150 -0
- data/vendor/ring/crypto/test/scoped_types.h +95 -0
- data/vendor/ring/crypto/test/test.Windows.vcxproj +35 -0
- data/vendor/ring/crypto/test/test_util.cc +46 -0
- data/vendor/ring/crypto/test/test_util.h +41 -0
- data/vendor/ring/crypto/thread_none.c +55 -0
- data/vendor/ring/crypto/thread_pthread.c +165 -0
- data/vendor/ring/crypto/thread_test.Windows.vcxproj +25 -0
- data/vendor/ring/crypto/thread_test.c +200 -0
- data/vendor/ring/crypto/thread_win.c +282 -0
- data/vendor/ring/examples/checkdigest.rs +103 -0
- data/vendor/ring/include/openssl/aes.h +121 -0
- data/vendor/ring/include/openssl/arm_arch.h +129 -0
- data/vendor/ring/include/openssl/base.h +156 -0
- data/vendor/ring/include/openssl/bn.h +794 -0
- data/vendor/ring/include/openssl/buffer.h +18 -0
- data/vendor/ring/include/openssl/bytestring.h +235 -0
- data/vendor/ring/include/openssl/chacha.h +37 -0
- data/vendor/ring/include/openssl/cmac.h +76 -0
- data/vendor/ring/include/openssl/cpu.h +184 -0
- data/vendor/ring/include/openssl/crypto.h +43 -0
- data/vendor/ring/include/openssl/curve25519.h +88 -0
- data/vendor/ring/include/openssl/ec.h +225 -0
- data/vendor/ring/include/openssl/ec_key.h +129 -0
- data/vendor/ring/include/openssl/ecdh.h +110 -0
- data/vendor/ring/include/openssl/ecdsa.h +156 -0
- data/vendor/ring/include/openssl/err.h +201 -0
- data/vendor/ring/include/openssl/mem.h +101 -0
- data/vendor/ring/include/openssl/obj_mac.h +71 -0
- data/vendor/ring/include/openssl/opensslfeatures.h +68 -0
- data/vendor/ring/include/openssl/opensslv.h +18 -0
- data/vendor/ring/include/openssl/ossl_typ.h +18 -0
- data/vendor/ring/include/openssl/poly1305.h +51 -0
- data/vendor/ring/include/openssl/rand.h +70 -0
- data/vendor/ring/include/openssl/rsa.h +399 -0
- data/vendor/ring/include/openssl/thread.h +133 -0
- data/vendor/ring/include/openssl/type_check.h +71 -0
- data/vendor/ring/mk/Common.props +63 -0
- data/vendor/ring/mk/Windows.props +42 -0
- data/vendor/ring/mk/WindowsTest.props +18 -0
- data/vendor/ring/mk/appveyor.bat +62 -0
- data/vendor/ring/mk/bottom_of_makefile.mk +54 -0
- data/vendor/ring/mk/ring.mk +266 -0
- data/vendor/ring/mk/top_of_makefile.mk +214 -0
- data/vendor/ring/mk/travis.sh +40 -0
- data/vendor/ring/mk/update-travis-yml.py +229 -0
- data/vendor/ring/ring.sln +153 -0
- data/vendor/ring/src/aead.rs +682 -0
- data/vendor/ring/src/agreement.rs +248 -0
- data/vendor/ring/src/c.rs +129 -0
- data/vendor/ring/src/constant_time.rs +37 -0
- data/vendor/ring/src/der.rs +96 -0
- data/vendor/ring/src/digest.rs +690 -0
- data/vendor/ring/src/digest_tests.txt +57 -0
- data/vendor/ring/src/ecc.rs +28 -0
- data/vendor/ring/src/ecc_build.rs +279 -0
- data/vendor/ring/src/ecc_curves.rs +117 -0
- data/vendor/ring/src/ed25519_tests.txt +2579 -0
- data/vendor/ring/src/exe_tests.rs +46 -0
- data/vendor/ring/src/ffi.rs +29 -0
- data/vendor/ring/src/file_test.rs +187 -0
- data/vendor/ring/src/hkdf.rs +153 -0
- data/vendor/ring/src/hkdf_tests.txt +59 -0
- data/vendor/ring/src/hmac.rs +414 -0
- data/vendor/ring/src/hmac_tests.txt +97 -0
- data/vendor/ring/src/input.rs +312 -0
- data/vendor/ring/src/lib.rs +41 -0
- data/vendor/ring/src/pbkdf2.rs +265 -0
- data/vendor/ring/src/pbkdf2_tests.txt +113 -0
- data/vendor/ring/src/polyfill.rs +57 -0
- data/vendor/ring/src/rand.rs +28 -0
- data/vendor/ring/src/signature.rs +314 -0
- data/vendor/ring/third-party/NIST/README.md +9 -0
- data/vendor/ring/third-party/NIST/SHAVS/SHA1LongMsg.rsp +263 -0
- data/vendor/ring/third-party/NIST/SHAVS/SHA1Monte.rsp +309 -0
- data/vendor/ring/third-party/NIST/SHAVS/SHA1ShortMsg.rsp +267 -0
- data/vendor/ring/third-party/NIST/SHAVS/SHA224LongMsg.rsp +263 -0
- data/vendor/ring/third-party/NIST/SHAVS/SHA224Monte.rsp +309 -0
- data/vendor/ring/third-party/NIST/SHAVS/SHA224ShortMsg.rsp +267 -0
- data/vendor/ring/third-party/NIST/SHAVS/SHA256LongMsg.rsp +263 -0
- data/vendor/ring/third-party/NIST/SHAVS/SHA256Monte.rsp +309 -0
- data/vendor/ring/third-party/NIST/SHAVS/SHA256ShortMsg.rsp +267 -0
- data/vendor/ring/third-party/NIST/SHAVS/SHA384LongMsg.rsp +519 -0
- data/vendor/ring/third-party/NIST/SHAVS/SHA384Monte.rsp +309 -0
- data/vendor/ring/third-party/NIST/SHAVS/SHA384ShortMsg.rsp +523 -0
- data/vendor/ring/third-party/NIST/SHAVS/SHA512LongMsg.rsp +519 -0
- data/vendor/ring/third-party/NIST/SHAVS/SHA512Monte.rsp +309 -0
- data/vendor/ring/third-party/NIST/SHAVS/SHA512ShortMsg.rsp +523 -0
- data/vendor/ring/third-party/NIST/sha256sums.txt +1 -0
- metadata +333 -0
@@ -0,0 +1,110 @@
|
|
1
|
+
/* ====================================================================
|
2
|
+
* Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
|
3
|
+
*
|
4
|
+
* The Elliptic Curve Public-Key Crypto Library (ECC Code) included
|
5
|
+
* herein is developed by SUN MICROSYSTEMS, INC., and is contributed
|
6
|
+
* to the OpenSSL project.
|
7
|
+
*
|
8
|
+
* The ECC Code is licensed pursuant to the OpenSSL open source
|
9
|
+
* license provided below.
|
10
|
+
*
|
11
|
+
* The ECDH software is originally written by Douglas Stebila of
|
12
|
+
* Sun Microsystems Laboratories.
|
13
|
+
*
|
14
|
+
*/
|
15
|
+
/* ====================================================================
|
16
|
+
* Copyright (c) 2000-2002 The OpenSSL Project. All rights reserved.
|
17
|
+
*
|
18
|
+
* Redistribution and use in source and binary forms, with or without
|
19
|
+
* modification, are permitted provided that the following conditions
|
20
|
+
* are met:
|
21
|
+
*
|
22
|
+
* 1. Redistributions of source code must retain the above copyright
|
23
|
+
* notice, this list of conditions and the following disclaimer.
|
24
|
+
*
|
25
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
26
|
+
* notice, this list of conditions and the following disclaimer in
|
27
|
+
* the documentation and/or other materials provided with the
|
28
|
+
* distribution.
|
29
|
+
*
|
30
|
+
* 3. All advertising materials mentioning features or use of this
|
31
|
+
* software must display the following acknowledgment:
|
32
|
+
* "This product includes software developed by the OpenSSL Project
|
33
|
+
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
34
|
+
*
|
35
|
+
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
36
|
+
* endorse or promote products derived from this software without
|
37
|
+
* prior written permission. For written permission, please contact
|
38
|
+
* licensing@OpenSSL.org.
|
39
|
+
*
|
40
|
+
* 5. Products derived from this software may not be called "OpenSSL"
|
41
|
+
* nor may "OpenSSL" appear in their names without prior written
|
42
|
+
* permission of the OpenSSL Project.
|
43
|
+
*
|
44
|
+
* 6. Redistributions of any form whatsoever must retain the following
|
45
|
+
* acknowledgment:
|
46
|
+
* "This product includes software developed by the OpenSSL Project
|
47
|
+
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
48
|
+
*
|
49
|
+
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
50
|
+
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
51
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
52
|
+
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
53
|
+
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
54
|
+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
55
|
+
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
56
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
57
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
58
|
+
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
59
|
+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
60
|
+
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
61
|
+
* ====================================================================
|
62
|
+
*
|
63
|
+
* This product includes cryptographic software written by Eric Young
|
64
|
+
* (eay@cryptsoft.com). This product includes software written by Tim
|
65
|
+
* Hudson (tjh@cryptsoft.com). */
|
66
|
+
|
67
|
+
#ifndef OPENSSL_HEADER_ECDH_H
|
68
|
+
#define OPENSSL_HEADER_ECDH_H
|
69
|
+
|
70
|
+
#include <openssl/base.h>
|
71
|
+
|
72
|
+
#include <openssl/ec_key.h>
|
73
|
+
|
74
|
+
#if defined(__cplusplus)
|
75
|
+
extern "C" {
|
76
|
+
#endif
|
77
|
+
|
78
|
+
|
79
|
+
/* Elliptic curve Diffie-Hellman. */
|
80
|
+
|
81
|
+
|
82
|
+
/* ECDH_compute_key_ex calculates the shared key between |priv_key| and
|
83
|
+
* and the given peer encoded public key. ECDH_compute_key_ex verifies that
|
84
|
+
* the peer public point curve, identified by |peer_pub_point_curve_nid| is the
|
85
|
+
* same as |priv_key|'s curve. It also verifies that the encoded peer public
|
86
|
+
* point in |peer_pub_point_bytes| with length |peer_pub_point_bytes_len| is on
|
87
|
+
* the curve. |max_out_len| must be at least
|
88
|
+
* |(EC_GROUP_get_degree(group) + 7) / 8|, and at most that many bytes of the
|
89
|
+
* computed shared key are copied directly to |out|. (This differs from what
|
90
|
+
* the OpenSSL |ECDH_compute_key| function does.) The number of bytes
|
91
|
+
* written to |out| is returned in |out_len|. It returns 1 on success and 0 on
|
92
|
+
* error. (This differs from what the OpenSSL |ECDH_compute_key| function
|
93
|
+
* returns.) */
|
94
|
+
OPENSSL_EXPORT int ECDH_compute_key_ex(uint8_t *out, size_t *out_len,
|
95
|
+
size_t max_out_len,
|
96
|
+
const EC_KEY *priv_key,
|
97
|
+
int peer_pub_point_curve_nid,
|
98
|
+
const uint8_t *peer_pub_point_bytes,
|
99
|
+
size_t peer_pub_point_bytes_len);
|
100
|
+
|
101
|
+
|
102
|
+
#if defined(__cplusplus)
|
103
|
+
} /* extern C */
|
104
|
+
#endif
|
105
|
+
|
106
|
+
#define ECDH_R_KDF_FAILED 100
|
107
|
+
#define ECDH_R_NO_PRIVATE_VALUE 101
|
108
|
+
#define ECDH_R_POINT_ARITHMETIC_FAILURE 102
|
109
|
+
|
110
|
+
#endif /* OPENSSL_HEADER_ECDH_H */
|
@@ -0,0 +1,156 @@
|
|
1
|
+
/* ====================================================================
|
2
|
+
* Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved.
|
3
|
+
*
|
4
|
+
* Redistribution and use in source and binary forms, with or without
|
5
|
+
* modification, are permitted provided that the following conditions
|
6
|
+
* are met:
|
7
|
+
*
|
8
|
+
* 1. Redistributions of source code must retain the above copyright
|
9
|
+
* notice, this list of conditions and the following disclaimer.
|
10
|
+
*
|
11
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
12
|
+
* notice, this list of conditions and the following disclaimer in
|
13
|
+
* the documentation and/or other materials provided with the
|
14
|
+
* distribution.
|
15
|
+
*
|
16
|
+
* 3. All advertising materials mentioning features or use of this
|
17
|
+
* software must display the following acknowledgment:
|
18
|
+
* "This product includes software developed by the OpenSSL Project
|
19
|
+
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
20
|
+
*
|
21
|
+
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
22
|
+
* endorse or promote products derived from this software without
|
23
|
+
* prior written permission. For written permission, please contact
|
24
|
+
* openssl-core@OpenSSL.org.
|
25
|
+
*
|
26
|
+
* 5. Products derived from this software may not be called "OpenSSL"
|
27
|
+
* nor may "OpenSSL" appear in their names without prior written
|
28
|
+
* permission of the OpenSSL Project.
|
29
|
+
*
|
30
|
+
* 6. Redistributions of any form whatsoever must retain the following
|
31
|
+
* acknowledgment:
|
32
|
+
* "This product includes software developed by the OpenSSL Project
|
33
|
+
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
34
|
+
*
|
35
|
+
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
36
|
+
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
37
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
38
|
+
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
39
|
+
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
40
|
+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
41
|
+
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
42
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
43
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
44
|
+
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
45
|
+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
46
|
+
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
47
|
+
* ====================================================================
|
48
|
+
*
|
49
|
+
* This product includes cryptographic software written by Eric Young
|
50
|
+
* (eay@cryptsoft.com). This product includes software written by Tim
|
51
|
+
* Hudson (tjh@cryptsoft.com). */
|
52
|
+
|
53
|
+
#ifndef OPENSSL_HEADER_ECDSA_H
|
54
|
+
#define OPENSSL_HEADER_ECDSA_H
|
55
|
+
|
56
|
+
#include <openssl/base.h>
|
57
|
+
|
58
|
+
#include <openssl/ec_key.h>
|
59
|
+
|
60
|
+
#if defined(__cplusplus)
|
61
|
+
extern "C" {
|
62
|
+
#endif
|
63
|
+
|
64
|
+
|
65
|
+
/* ECDSA contains functions for signing and verifying with the Digital Signature
|
66
|
+
* Algorithm over elliptic curves. */
|
67
|
+
|
68
|
+
|
69
|
+
/* Signing and verifing. */
|
70
|
+
|
71
|
+
/* ECDSA_verify_signed_digest verifies that |sig_len| bytes from |sig|
|
72
|
+
* constitute a valid signature of |digest| for the public key |ec_key| for
|
73
|
+
* the curve represented by the |EC_GROUP| created by |ec_group_new|.
|
74
|
+
* |hash_nid| must be the identifier of the digest function used to calculate
|
75
|
+
* |digest|. It returns one on success or zero if the signature is invalid or
|
76
|
+
* on error. */
|
77
|
+
OPENSSL_EXPORT int ECDSA_verify_signed_digest(const EC_GROUP *group,
|
78
|
+
int hash_nid,
|
79
|
+
const uint8_t *digest,
|
80
|
+
size_t digest_len,
|
81
|
+
const uint8_t *sig,
|
82
|
+
size_t sig_len,
|
83
|
+
const uint8_t *ec_key,
|
84
|
+
const size_t ec_key_len);
|
85
|
+
|
86
|
+
/* ECDSA_sign signs |digest_len| bytes from |digest| with |key| and writes the
|
87
|
+
* resulting signature to |sig|, which must have |ECDSA_size(key)| bytes of
|
88
|
+
* space. On successful exit, |*sig_len| is set to the actual number of bytes
|
89
|
+
* written. The |type| argument should be zero. It returns one on success and
|
90
|
+
* zero otherwise. */
|
91
|
+
OPENSSL_EXPORT int ECDSA_sign(int type, const uint8_t *digest,
|
92
|
+
size_t digest_len, uint8_t *sig,
|
93
|
+
unsigned int *sig_len, EC_KEY *key);
|
94
|
+
|
95
|
+
/* ECDSA_size returns the maximum size of an ECDSA signature using |key|. It
|
96
|
+
* returns zero on error. */
|
97
|
+
OPENSSL_EXPORT size_t ECDSA_size(const EC_KEY *key);
|
98
|
+
|
99
|
+
|
100
|
+
/* Low-level signing and verification.
|
101
|
+
*
|
102
|
+
* Low-level functions handle signatures as |ECDSA_SIG| structures which allow
|
103
|
+
* the two values in an ECDSA signature to be handled separately. */
|
104
|
+
|
105
|
+
struct ecdsa_sig_st {
|
106
|
+
BIGNUM *r;
|
107
|
+
BIGNUM *s;
|
108
|
+
};
|
109
|
+
|
110
|
+
/* ECDSA_SIG_new returns a fresh |ECDSA_SIG| structure or NULL on error. */
|
111
|
+
OPENSSL_EXPORT ECDSA_SIG *ECDSA_SIG_new(void);
|
112
|
+
|
113
|
+
/* ECDSA_SIG_free frees |sig| its member |BIGNUM|s. */
|
114
|
+
OPENSSL_EXPORT void ECDSA_SIG_free(ECDSA_SIG *sig);
|
115
|
+
|
116
|
+
|
117
|
+
/* ASN.1 functions. */
|
118
|
+
|
119
|
+
/* ECDSA_SIG_parse parses a DER-encoded ECDSA-Sig-Value structure from |cbs| and
|
120
|
+
* advances |cbs|. It returns a newly-allocated |ECDSA_SIG| or NULL on error. */
|
121
|
+
OPENSSL_EXPORT ECDSA_SIG *ECDSA_SIG_parse(CBS *cbs);
|
122
|
+
|
123
|
+
/* ECDSA_SIG_from_bytes parses |in| as a DER-encoded ECDSA-Sig-Value structure.
|
124
|
+
* It returns a newly-allocated |ECDSA_SIG| structure or NULL on error. */
|
125
|
+
OPENSSL_EXPORT ECDSA_SIG *ECDSA_SIG_from_bytes(const uint8_t *in,
|
126
|
+
size_t in_len);
|
127
|
+
|
128
|
+
/* ECDSA_SIG_marshal marshals |sig| as a DER-encoded ECDSA-Sig-Value and appends
|
129
|
+
* the result to |cbb|. It returns one on success and zero on error. */
|
130
|
+
OPENSSL_EXPORT int ECDSA_SIG_marshal(CBB *cbb, const ECDSA_SIG *sig);
|
131
|
+
|
132
|
+
/* ECDSA_SIG_to_bytes marshals |sig| as a DER-encoded ECDSA-Sig-Value and, on
|
133
|
+
* success, sets |*out_bytes| to a newly allocated buffer containing the result
|
134
|
+
* and returns one. Otherwise, it returns zero. The result should be freed with
|
135
|
+
* |OPENSSL_free|. */
|
136
|
+
OPENSSL_EXPORT int ECDSA_SIG_to_bytes(uint8_t **out_bytes, size_t *out_len,
|
137
|
+
const ECDSA_SIG *sig);
|
138
|
+
|
139
|
+
/* ECDSA_SIG_max_len returns the maximum length of a DER-encoded ECDSA-Sig-Value
|
140
|
+
* structure for a group whose order is represented in |order_len| bytes, or
|
141
|
+
* zero on overflow. */
|
142
|
+
OPENSSL_EXPORT size_t ECDSA_SIG_max_len(size_t order_len);
|
143
|
+
|
144
|
+
|
145
|
+
#if defined(__cplusplus)
|
146
|
+
} /* extern C */
|
147
|
+
#endif
|
148
|
+
|
149
|
+
#define ECDSA_R_BAD_SIGNATURE 100
|
150
|
+
#define ECDSA_R_MISSING_PARAMETERS 101
|
151
|
+
#define ECDSA_R_NEED_NEW_SETUP_VALUES 102
|
152
|
+
#define ECDSA_R_NOT_IMPLEMENTED 103
|
153
|
+
#define ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED 104
|
154
|
+
#define ECDSA_R_ENCODE_ERROR 105
|
155
|
+
|
156
|
+
#endif /* OPENSSL_HEADER_ECDSA_H */
|
@@ -0,0 +1,201 @@
|
|
1
|
+
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
2
|
+
* All rights reserved.
|
3
|
+
*
|
4
|
+
* This package is an SSL implementation written
|
5
|
+
* by Eric Young (eay@cryptsoft.com).
|
6
|
+
* The implementation was written so as to conform with Netscapes SSL.
|
7
|
+
*
|
8
|
+
* This library is free for commercial and non-commercial use as long as
|
9
|
+
* the following conditions are aheared to. The following conditions
|
10
|
+
* apply to all code found in this distribution, be it the RC4, RSA,
|
11
|
+
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
12
|
+
* included with this distribution is covered by the same copyright terms
|
13
|
+
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
14
|
+
*
|
15
|
+
* Copyright remains Eric Young's, and as such any Copyright notices in
|
16
|
+
* the code are not to be removed.
|
17
|
+
* If this package is used in a product, Eric Young should be given attribution
|
18
|
+
* as the author of the parts of the library used.
|
19
|
+
* This can be in the form of a textual message at program startup or
|
20
|
+
* in documentation (online or textual) provided with the package.
|
21
|
+
*
|
22
|
+
* Redistribution and use in source and binary forms, with or without
|
23
|
+
* modification, are permitted provided that the following conditions
|
24
|
+
* are met:
|
25
|
+
* 1. Redistributions of source code must retain the copyright
|
26
|
+
* notice, this list of conditions and the following disclaimer.
|
27
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
28
|
+
* notice, this list of conditions and the following disclaimer in the
|
29
|
+
* documentation and/or other materials provided with the distribution.
|
30
|
+
* 3. All advertising materials mentioning features or use of this software
|
31
|
+
* must display the following acknowledgement:
|
32
|
+
* "This product includes cryptographic software written by
|
33
|
+
* Eric Young (eay@cryptsoft.com)"
|
34
|
+
* The word 'cryptographic' can be left out if the rouines from the library
|
35
|
+
* being used are not cryptographic related :-).
|
36
|
+
* 4. If you include any Windows specific code (or a derivative thereof) from
|
37
|
+
* the apps directory (application code) you must include an acknowledgement:
|
38
|
+
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
39
|
+
*
|
40
|
+
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
41
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
42
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
43
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
44
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
45
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
46
|
+
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
47
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
48
|
+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
49
|
+
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
50
|
+
* SUCH DAMAGE.
|
51
|
+
*
|
52
|
+
* The licence and distribution terms for any publically available version or
|
53
|
+
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
54
|
+
* copied and put under another distribution licence
|
55
|
+
* [including the GNU Public Licence.]
|
56
|
+
*/
|
57
|
+
/* ====================================================================
|
58
|
+
* Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
|
59
|
+
*
|
60
|
+
* Redistribution and use in source and binary forms, with or without
|
61
|
+
* modification, are permitted provided that the following conditions
|
62
|
+
* are met:
|
63
|
+
*
|
64
|
+
* 1. Redistributions of source code must retain the above copyright
|
65
|
+
* notice, this list of conditions and the following disclaimer.
|
66
|
+
*
|
67
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
68
|
+
* notice, this list of conditions and the following disclaimer in
|
69
|
+
* the documentation and/or other materials provided with the
|
70
|
+
* distribution.
|
71
|
+
*
|
72
|
+
* 3. All advertising materials mentioning features or use of this
|
73
|
+
* software must display the following acknowledgment:
|
74
|
+
* "This product includes software developed by the OpenSSL Project
|
75
|
+
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
76
|
+
*
|
77
|
+
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
78
|
+
* endorse or promote products derived from this software without
|
79
|
+
* prior written permission. For written permission, please contact
|
80
|
+
* openssl-core@openssl.org.
|
81
|
+
*
|
82
|
+
* 5. Products derived from this software may not be called "OpenSSL"
|
83
|
+
* nor may "OpenSSL" appear in their names without prior written
|
84
|
+
* permission of the OpenSSL Project.
|
85
|
+
*
|
86
|
+
* 6. Redistributions of any form whatsoever must retain the following
|
87
|
+
* acknowledgment:
|
88
|
+
* "This product includes software developed by the OpenSSL Project
|
89
|
+
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
90
|
+
*
|
91
|
+
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
92
|
+
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
93
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
94
|
+
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
95
|
+
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
96
|
+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
97
|
+
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
98
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
99
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
100
|
+
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
101
|
+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
102
|
+
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
103
|
+
* ====================================================================
|
104
|
+
*
|
105
|
+
* This product includes cryptographic software written by Eric Young
|
106
|
+
* (eay@cryptsoft.com). This product includes software written by Tim
|
107
|
+
* Hudson (tjh@cryptsoft.com). */
|
108
|
+
|
109
|
+
#ifndef OPENSSL_HEADER_ERR_H
|
110
|
+
#define OPENSSL_HEADER_ERR_H
|
111
|
+
|
112
|
+
#include <stdio.h>
|
113
|
+
|
114
|
+
#include <openssl/base.h>
|
115
|
+
|
116
|
+
#if defined(__cplusplus)
|
117
|
+
extern "C" {
|
118
|
+
#endif
|
119
|
+
|
120
|
+
|
121
|
+
/* Error queue handling functions.
|
122
|
+
*
|
123
|
+
* ring: No error state is maintained. The calls to |OPENSSL_PUT_ERROR| are
|
124
|
+
* retained in the code to help with keeping *ring* in sync with upstream, but
|
125
|
+
* they do nothing. All the functions and macros to read the error state have
|
126
|
+
* been removed. */
|
127
|
+
|
128
|
+
|
129
|
+
/* Private functions. */
|
130
|
+
|
131
|
+
#define OPENSSL_PUT_ERROR(library, reason)
|
132
|
+
#define OPENSSL_PUT_SYSTEM_ERROR(func)
|
133
|
+
#define ERR_clear_error()
|
134
|
+
|
135
|
+
|
136
|
+
enum {
|
137
|
+
ERR_LIB_NONE = 1,
|
138
|
+
ERR_LIB_SYS,
|
139
|
+
ERR_LIB_BN,
|
140
|
+
ERR_LIB_RSA,
|
141
|
+
ERR_LIB_DH,
|
142
|
+
ERR_LIB_EVP,
|
143
|
+
ERR_LIB_BUF,
|
144
|
+
ERR_LIB_CRYPTO,
|
145
|
+
ERR_LIB_EC,
|
146
|
+
ERR_LIB_RAND,
|
147
|
+
ERR_LIB_UI,
|
148
|
+
ERR_LIB_COMP,
|
149
|
+
ERR_LIB_ECDSA,
|
150
|
+
ERR_LIB_ECDH,
|
151
|
+
ERR_LIB_DIGEST,
|
152
|
+
ERR_LIB_CIPHER,
|
153
|
+
ERR_LIB_USER,
|
154
|
+
ERR_NUM_LIBS
|
155
|
+
};
|
156
|
+
|
157
|
+
#define ERR_R_SYS_LIB ERR_LIB_SYS
|
158
|
+
#define ERR_R_BN_LIB ERR_LIB_BN
|
159
|
+
#define ERR_R_RSA_LIB ERR_LIB_RSA
|
160
|
+
#define ERR_R_DH_LIB ERR_LIB_DH
|
161
|
+
#define ERR_R_EVP_LIB ERR_LIB_EVP
|
162
|
+
#define ERR_R_BUF_LIB ERR_LIB_BUF
|
163
|
+
#define ERR_R_CRYPTO_LIB ERR_LIB_CRYPTO
|
164
|
+
#define ERR_R_EC_LIB ERR_LIB_EC
|
165
|
+
#define ERR_R_RAND_LIB ERR_LIB_RAND
|
166
|
+
#define ERR_R_DSO_LIB ERR_LIB_DSO
|
167
|
+
#define ERR_R_UI_LIB ERR_LIB_UI
|
168
|
+
#define ERR_R_COMP_LIB ERR_LIB_COMP
|
169
|
+
#define ERR_R_ECDSA_LIB ERR_LIB_ECDSA
|
170
|
+
#define ERR_R_ECDH_LIB ERR_LIB_ECDH
|
171
|
+
#define ERR_R_STORE_LIB ERR_LIB_STORE
|
172
|
+
#define ERR_R_FIPS_LIB ERR_LIB_FIPS
|
173
|
+
#define ERR_R_CMS_LIB ERR_LIB_CMS
|
174
|
+
#define ERR_R_TS_LIB ERR_LIB_TS
|
175
|
+
#define ERR_R_JPAKE_LIB ERR_LIB_JPAKE
|
176
|
+
#define ERR_R_USER_LIB ERR_LIB_USER
|
177
|
+
#define ERR_R_DIGEST_LIB ERR_LIB_DIGEST
|
178
|
+
#define ERR_R_CIPHER_LIB ERR_LIB_CIPHER
|
179
|
+
|
180
|
+
/* Global reasons. */
|
181
|
+
#define ERR_R_FATAL 64
|
182
|
+
#define ERR_R_MALLOC_FAILURE (1 | ERR_R_FATAL)
|
183
|
+
#define ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED (2 | ERR_R_FATAL)
|
184
|
+
#define ERR_R_PASSED_NULL_PARAMETER (3 | ERR_R_FATAL)
|
185
|
+
#define ERR_R_INTERNAL_ERROR (4 | ERR_R_FATAL)
|
186
|
+
#define ERR_R_OVERFLOW (5 | ERR_R_FATAL)
|
187
|
+
|
188
|
+
|
189
|
+
/* OPENSSL_DECLARE_ERROR_REASON is used by util/make_errors.h (which generates
|
190
|
+
* the error defines) to recognise that an additional reason value is needed.
|
191
|
+
* This is needed when the reason value is used outside of an
|
192
|
+
* |OPENSSL_PUT_ERROR| macro. The resulting define will be
|
193
|
+
* ${lib}_R_${reason}. */
|
194
|
+
#define OPENSSL_DECLARE_ERROR_REASON(lib, reason)
|
195
|
+
|
196
|
+
|
197
|
+
#if defined(__cplusplus)
|
198
|
+
} /* extern C */
|
199
|
+
#endif
|
200
|
+
|
201
|
+
#endif /* OPENSSL_HEADER_ERR_H */
|