summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec
diff options
context:
space:
mode:
authorjsing <>2016-12-21 15:49:29 +0000
committerjsing <>2016-12-21 15:49:29 +0000
commitb0083b858b1b84b8b19bc553faa582079dda96ae (patch)
treedc6bf9e697be4171031836e4b004f8c6c396b66c /src/lib/libcrypto/ec
parent2bf82d6a2f5736c3b836867840e3ec84075634ca (diff)
downloadopenbsd-b0083b858b1b84b8b19bc553faa582079dda96ae.tar.gz
openbsd-b0083b858b1b84b8b19bc553faa582079dda96ae.tar.bz2
openbsd-b0083b858b1b84b8b19bc553faa582079dda96ae.zip
Explicitly export a list of symbols from libcrypto.
Move the "internal" BN functions from bn.h to bn_lcl.h and stop exporting the bn_* symbols. These are documented as only being intended for internal use, so why they were placed in a public header is beyond me... This hides 363 previously exported symbols, most of which exist in headers that are not installed and were never intended to be public. This also removes a few crusty old things that should have died long ago (like _ossl_old_des_read_pw). But don't worry... there are still 3451 symbols exported from the library. With input and testing from inoguchi@. ok beck@ inoguchi@
Diffstat (limited to 'src/lib/libcrypto/ec')
-rw-r--r--src/lib/libcrypto/ec/ec_lcl.h11
-rw-r--r--src/lib/libcrypto/ec/ecp_nistz256_table.h6
2 files changed, 14 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ec/ec_lcl.h b/src/lib/libcrypto/ec/ec_lcl.h
index d11aaed8cb..e1c91e67ab 100644
--- a/src/lib/libcrypto/ec/ec_lcl.h
+++ b/src/lib/libcrypto/ec/ec_lcl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_lcl.h,v 1.6 2016/11/04 17:33:19 miod Exp $ */ 1/* $OpenBSD: ec_lcl.h,v 1.7 2016/12/21 15:49:29 jsing Exp $ */
2/* 2/*
3 * Originally written by Bodo Moeller for the OpenSSL project. 3 * Originally written by Bodo Moeller for the OpenSSL project.
4 */ 4 */
@@ -69,19 +69,23 @@
69 * 69 *
70 */ 70 */
71 71
72
73#include <stdlib.h> 72#include <stdlib.h>
74 73
75#include <openssl/obj_mac.h> 74#include <openssl/obj_mac.h>
76#include <openssl/ec.h> 75#include <openssl/ec.h>
77#include <openssl/bn.h> 76#include <openssl/bn.h>
78 77
78__BEGIN_HIDDEN_DECLS
79
79#if defined(__SUNPRO_C) 80#if defined(__SUNPRO_C)
80# if __SUNPRO_C >= 0x520 81# if __SUNPRO_C >= 0x520
81# pragma error_messages (off,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE) 82# pragma error_messages (off,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE)
82# endif 83# endif
83#endif 84#endif
84 85
86#define bn_wexpand(a,words) (((words) <= (a)->dmax)?(a):bn_expand2((a),(words)))
87BIGNUM *bn_expand2(BIGNUM *a, int words);
88
85/* Use default functions for poin2oct, oct2point and compressed coordinates */ 89/* Use default functions for poin2oct, oct2point and compressed coordinates */
86#define EC_FLAGS_DEFAULT_OCT 0x1 90#define EC_FLAGS_DEFAULT_OCT 0x1
87 91
@@ -447,4 +451,7 @@ void ec_GFp_nistp_points_make_affine_internal(size_t num, void *point_array,
447 void (*felem_inv)(void *out, const void *in), 451 void (*felem_inv)(void *out, const void *in),
448 void (*felem_contract)(void *out, const void *in)); 452 void (*felem_contract)(void *out, const void *in));
449void ec_GFp_nistp_recode_scalar_bits(unsigned char *sign, unsigned char *digit, unsigned char in); 453void ec_GFp_nistp_recode_scalar_bits(unsigned char *sign, unsigned char *digit, unsigned char in);
454
450#endif 455#endif
456
457__END_HIDDEN_DECLS
diff --git a/src/lib/libcrypto/ec/ecp_nistz256_table.h b/src/lib/libcrypto/ec/ecp_nistz256_table.h
index 61f32a8a5a..6aa74edf35 100644
--- a/src/lib/libcrypto/ec/ecp_nistz256_table.h
+++ b/src/lib/libcrypto/ec/ecp_nistz256_table.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecp_nistz256_table.h,v 1.1 2016/11/04 17:33:19 miod Exp $ */ 1/* $OpenBSD: ecp_nistz256_table.h,v 1.2 2016/12/21 15:49:29 jsing Exp $ */
2/* Copyright (c) 2015, Intel Inc. 2/* Copyright (c) 2015, Intel Inc.
3 * 3 *
4 * Permission to use, copy, modify, and/or distribute this software for any 4 * Permission to use, copy, modify, and/or distribute this software for any
@@ -25,6 +25,8 @@
25 * in order to increase the chances of using a large page but that appears to 25 * in order to increase the chances of using a large page but that appears to
26 * lead to invalid ELF files being produced. */ 26 * lead to invalid ELF files being produced. */
27 27
28__BEGIN_HIDDEN_DECLS
29
28#if defined(__GNUC__) 30#if defined(__GNUC__)
29__attribute((aligned(4096))) 31__attribute((aligned(4096)))
30#elif defined(_MSC_VER) 32#elif defined(_MSC_VER)
@@ -9551,3 +9553,5 @@ ecp_nistz256_precomputed
9551 TOBN(0xd6baef61, 0x3f714aa1), TOBN(0xf51865ad, 0xeb78795e), 9553 TOBN(0xd6baef61, 0x3f714aa1), TOBN(0xf51865ad, 0xeb78795e),
9552 TOBN(0xd3e21fce, 0xe6a9d694), TOBN(0x82ceb1dd, 0x8a37b527)} 9554 TOBN(0xd3e21fce, 0xe6a9d694), TOBN(0x82ceb1dd, 0x8a37b527)}
9553}; 9555};
9556
9557__END_HIDDEN_DECLS