Stephen Henson via RT wrote:
> On Sat Jun 25 22:09:59 2016, ope...@roumenpetrov.info
>> Above is reason the request to remove const from return argument of get0
> We had a discussion about this and the preference was to have get methods
> retain const for various reasons.
> Instead the DSA_SIG/ECDSA_SIG structures now no longer pre-allocate r/s so they
> aren't immediately freed when you set them.
Please update documentation (status of 3.8.2016):
DSA_SIG_new() allocates and initializes a B<DSA_SIG> structure.
So now function only allocates signature.
ECDSA_SIG_new() allocates a new B<ECDSA_SIG> structure (note: this
function also allocates the BIGNUMs) and initializes it.
Same here, but please indicate that this is changed in 1.1.
>> The issue is not only for ECDSA but also for DSA_SIG and RSA, DSA, DH
>> keys where situation is similar.
> Do you have some examples of how this affects other structures? For RSA/DSA/DH
> keys the fields are NULL initially unless I've missed something.
Impact is over other software where more or less situation is the same -
code allocates and initialize(!) keys.
In deserialization process just updates allocated key material.
It seemt to me now is more easy just to perform "const cast hack"
instead to rewrite totally code.