GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  BN_WITH_FLAGS (3)

.ds Aq ’

NAME

BN_copy, BN_dup, BN_with_flags - copy BIGNUMs

CONTENTS

SYNOPSIS



 #include <openssl/bn.h>

 BIGNUM *BN_copy(BIGNUM *to, const BIGNUM *from);

 BIGNUM *BN_dup(const BIGNUM *from);

 void BN_with_flags(BIGNUM *dest, const BIGNUM *b, int flags);



DESCRIPTION

BN_copy() copies from to to. BN_dup() creates a new BIGNUM containing the value from.

BN_with_flags creates a temporary shallow copy of b in dest. It places significant restrictions on the copied data. Applications that do no adhere to these restrictions may encounter unexpected side effects or crashes. For that reason use of this function is discouraged. Any flags provided in flags will be set in dest in addition to any flags already set in b. For example this might commonly be used to create a temporary copy of a BIGNUM with the BN_FLG_CONSTTIME flag set for constant time operations. The temporary copy in dest will share some internal state with b. For this reason the following restrictions apply to the use of dest:
o dest should be a newly allocated BIGNUM obtained via a call to BN_new(). It should not have been used for other purposes or initialised in any way.
o dest must only be used in read-only operations, i.e. typically those functions where the relevant parameter is declared const.
o dest must be used and freed before any further subsequent use of b

RETURN VALUES

BN_copy() returns to on success, NULL on error. BN_dup() returns the new BIGNUM, and NULL on error. The error codes can be obtained by ERR_get_error(3).

SEE ALSO

bn(3), ERR_get_error(3)
Search for    or go to Top of page |  Section 3 |  Main Index


1.1.0-pre3 BN_COPY (3) 2016-02-15

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.