Re: [Openvpn-devel] [PATCH v2 3/5] Move NCP related function into a seperate file and add unit tests

2020-02-14 Thread Lev Stipakov
I found this discussion https://sourceforge.net/p/openvpn/mailman/message/34405489/ and wonder if we should replace strdup with string_alloc("AES-256-GCM"). If the result of strdup is NULL because of OOM, then following is NULL char *peer_ncp_list = tls_peer_ncp_list(peer_info); and it is

Re: [Openvpn-devel] [PATCH v2 3/5] Move NCP related function into a seperate file and add unit tests

2020-02-14 Thread Arne Schwabe
Am 14.02.20 um 14:08 schrieb Lev Stipakov: > Hi, > > > > I was planning to send a separate patch, but since you moved > this code, maybe you could fix it here. > >> +bool >> +tls_item_in_cipher_list(const char *item, const char *list) >> +{ >> +    char *tmp_ciphers = string_alloc(list, NULL);

Re: [Openvpn-devel] [PATCH v2 3/5] Move NCP related function into a seperate file and add unit tests

2020-02-14 Thread Lev Stipakov
Hi, I was planning to send a separate patch, but since you moved this code, maybe you could fix it here. > +bool > +tls_item_in_cipher_list(const char *item, const char *list) > +{ > +char *tmp_ciphers = string_alloc(list, NULL); > +char *tmp_ciphers_orig = tmp_ciphers; This is