summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bn/bn_lib.c')
-rw-r--r--src/lib/libcrypto/bn/bn_lib.c27
1 files changed, 26 insertions, 1 deletions
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
892BN_GENCB *
893BN_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
903void
904BN_GENCB_free(BN_GENCB *cb)
905{
906 if (cb == NULL)
907 return;
908 free(cb);
909}
910
911void *
912BN_GENCB_get_arg(BN_GENCB *cb)
913{
914 return cb->arg;
915}