diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/Symbols.list | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/bn/bn.h | 7 | ||||
| -rw-r--r-- | src/lib/libcrypto/bn/bn_lib.c | 27 |
3 files changed, 35 insertions, 2 deletions
diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list index 022176264e..23030bdb15 100644 --- a/src/lib/libcrypto/Symbols.list +++ b/src/lib/libcrypto/Symbols.list | |||
| @@ -375,6 +375,9 @@ BN_CTX_init | |||
| 375 | BN_CTX_new | 375 | BN_CTX_new |
| 376 | BN_CTX_start | 376 | BN_CTX_start |
| 377 | BN_GENCB_call | 377 | BN_GENCB_call |
| 378 | BN_GENCB_free | ||
| 379 | BN_GENCB_get_arg | ||
| 380 | BN_GENCB_new | ||
| 378 | BN_GF2m_add | 381 | BN_GF2m_add |
| 379 | BN_GF2m_arr2poly | 382 | BN_GF2m_arr2poly |
| 380 | BN_GF2m_mod | 383 | BN_GF2m_mod |
diff --git a/src/lib/libcrypto/bn/bn.h b/src/lib/libcrypto/bn/bn.h index cca9def20b..cd94e39345 100644 --- a/src/lib/libcrypto/bn/bn.h +++ b/src/lib/libcrypto/bn/bn.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bn.h,v 1.37 2018/02/20 17:02:30 jsing Exp $ */ | 1 | /* $OpenBSD: bn.h,v 1.38 2018/02/20 17:13:14 jsing Exp $ */ |
| 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -285,6 +285,11 @@ struct bn_gencb_st { | |||
| 285 | int (*cb_2)(int, int, BN_GENCB *); | 285 | int (*cb_2)(int, int, BN_GENCB *); |
| 286 | } cb; | 286 | } cb; |
| 287 | }; | 287 | }; |
| 288 | |||
| 289 | BN_GENCB *BN_GENCB_new(void); | ||
| 290 | void BN_GENCB_free(BN_GENCB *cb); | ||
| 291 | void *BN_GENCB_get_arg(BN_GENCB *cb); | ||
| 292 | |||
| 288 | /* Wrapper function to make using BN_GENCB easier, */ | 293 | /* Wrapper function to make using BN_GENCB easier, */ |
| 289 | int BN_GENCB_call(BN_GENCB *cb, int a, int b); | 294 | int BN_GENCB_call(BN_GENCB *cb, int a, int b); |
| 290 | /* Macro to populate a BN_GENCB structure with an "old"-style callback */ | 295 | /* Macro to populate a BN_GENCB structure with an "old"-style callback */ |
diff --git a/src/lib/libcrypto/bn/bn_lib.c b/src/lib/libcrypto/bn/bn_lib.c index 8aeeb5304f..ffb5ee7c2e 100644 --- a/src/lib/libcrypto/bn/bn_lib.c +++ b/src/lib/libcrypto/bn/bn_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bn_lib.c,v 1.38 2017/05/02 03:59:44 deraadt Exp $ */ | 1 | /* $OpenBSD: bn_lib.c,v 1.39 2018/02/20 17:13:14 jsing Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -888,3 +888,28 @@ BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords) | |||
| 888 | } | 888 | } |
| 889 | #undef BN_CONSTTIME_SWAP | 889 | #undef BN_CONSTTIME_SWAP |
| 890 | } | 890 | } |
| 891 | |||
| 892 | BN_GENCB * | ||
| 893 | BN_GENCB_new(void) | ||
| 894 | { | ||
| 895 | BN_GENCB *cb; | ||
| 896 | |||
| 897 | if ((cb = calloc(1, sizeof(*cb))) == NULL) | ||
| 898 | return NULL; | ||
| 899 | |||
| 900 | return cb; | ||
| 901 | } | ||
| 902 | |||
| 903 | void | ||
| 904 | BN_GENCB_free(BN_GENCB *cb) | ||
| 905 | { | ||
| 906 | if (cb == NULL) | ||
| 907 | return; | ||
| 908 | free(cb); | ||
| 909 | } | ||
| 910 | |||
| 911 | void * | ||
| 912 | BN_GENCB_get_arg(BN_GENCB *cb) | ||
| 913 | { | ||
| 914 | return cb->arg; | ||
| 915 | } | ||
