1 1.1 christos =pod 2 1.1 christos 3 1.1 christos =head1 NAME 4 1.1 christos 5 1.1 christos DSA_SIG_get0, DSA_SIG_set0, 6 1.1 christos DSA_SIG_new, DSA_SIG_free - allocate and free DSA signature objects 7 1.1 christos 8 1.1 christos =head1 SYNOPSIS 9 1.1 christos 10 1.1 christos #include <openssl/dsa.h> 11 1.1 christos 12 1.1 christos DSA_SIG *DSA_SIG_new(void); 13 1.1 christos void DSA_SIG_free(DSA_SIG *a); 14 1.1 christos void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps); 15 1.1 christos int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s); 16 1.1 christos 17 1.1 christos =head1 DESCRIPTION 18 1.1 christos 19 1.1 christos DSA_SIG_new() allocates an empty B<DSA_SIG> structure. 20 1.1 christos 21 1.1 christos DSA_SIG_free() frees the B<DSA_SIG> structure and its components. The 22 1.1 christos values are erased before the memory is returned to the system. 23 1.1.1.3 christos If the argument is NULL, nothing is done. 24 1.1 christos 25 1.1 christos DSA_SIG_get0() returns internal pointers to the B<r> and B<s> values contained 26 1.1 christos in B<sig>. 27 1.1 christos 28 1.1 christos The B<r> and B<s> values can be set by calling DSA_SIG_set0() and passing the 29 1.1 christos new values for B<r> and B<s> as parameters to the function. Calling this 30 1.1 christos function transfers the memory management of the values to the DSA_SIG object, 31 1.1 christos and therefore the values that have been passed in should not be freed directly 32 1.1 christos after this function has been called. 33 1.1 christos 34 1.1 christos =head1 RETURN VALUES 35 1.1 christos 36 1.1 christos If the allocation fails, DSA_SIG_new() returns B<NULL> and sets an 37 1.1 christos error code that can be obtained by 38 1.1 christos L<ERR_get_error(3)>. Otherwise it returns a pointer 39 1.1 christos to the newly allocated structure. 40 1.1 christos 41 1.1 christos DSA_SIG_free() returns no value. 42 1.1 christos 43 1.1 christos DSA_SIG_set0() returns 1 on success or 0 on failure. 44 1.1 christos 45 1.1 christos =head1 SEE ALSO 46 1.1 christos 47 1.1.1.2 christos L<EVP_PKEY_new(3)>, L<EVP_PKEY_free(3)>, L<EVP_PKEY_get_bn_param(3)>, 48 1.1.1.2 christos L<ERR_get_error(3)> 49 1.1 christos 50 1.1 christos =head1 COPYRIGHT 51 1.1 christos 52 1.1.1.3 christos Copyright 2000-2024 The OpenSSL Project Authors. All Rights Reserved. 53 1.1 christos 54 1.1.1.2 christos Licensed under the Apache License 2.0 (the "License"). You may not use 55 1.1 christos this file except in compliance with the License. You can obtain a copy 56 1.1 christos in the file LICENSE in the source distribution or at 57 1.1 christos L<https://www.openssl.org/source/license.html>. 58 1.1 christos 59 1.1 christos =cut 60