Hi,
On 22/07/18 17:53, Steffan Karger wrote:
>>> +uint8_t *dst_data = buf_write_alloc(dst, data_read_len);
>>> +if (!dst_data)
>>> +{
>>> +dmsg(D_CRYPT_ERRORS, "%s: dst too small (%i, needs %li)", __func__,
>>> + BCAP(dst), data_read_len);
>>> +goto cleanup;
Hi,
On 20-07-18 13:20, Antonio Quartulli wrote:
> Hi,
>
> On 05/07/18 01:53, Steffan Karger wrote:
> [CUT]
>
>> +bool
>> +crypto_pem_decode(const char *name, struct buffer *dst,
>> + const struct buffer *src)
>> +{
>> +bool ret = false;
>> +BIO *bio;
>> +
>> +if (!(b
Hi,
On 05/07/18 01:53, Steffan Karger wrote:
[CUT]
> +bool
> +crypto_pem_decode(const char *name, struct buffer *dst,
> + const struct buffer *src)
> +{
> +bool ret = false;
> +BIO *bio;
> +
> +if (!(bio = BIO_new_mem_buf((char *)BPTR(src), BLEN(src
minor style n
From: Steffan Karger
Needed for tls-crypt-v2, but isolated enough to be reviewed as a separate
patch.
The encode API allocates memory, because it fits our typical gc-oriented
code pattern and the caller does not have to do multiple calls or
calculations to determine the required destination buff