On 08/05/2020 23:23, Antonio Quartulli wrote:
> Now that the whole inline logic has been converted to using bool flags,
> the TAG_FILE_INLINE constant is not useful anymore.
> 
> Get rid of the constant as it's now unused and to prevent any future
> developer from mistakenly use it again.
> 
> Signed-off-by: Antonio Quartulli <a...@unstable.cc>
> ---
> 
> to be applied after all other fixes, as they remove the few last usages
> of this constant.
> 
> 
>  src/openvpn/common.h | 6 ------
>  src/openvpn/crypto.c | 2 +-
>  2 files changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/src/openvpn/common.h b/src/openvpn/common.h
> index 4e6f4809..623b3e0d 100644
> --- a/src/openvpn/common.h
> +++ b/src/openvpn/common.h
> @@ -88,12 +88,6 @@ typedef unsigned long ptr_type;
>   */
>  #define PUSH_REQUEST_INTERVAL 5
>  
> -/*
> - * A sort of pseudo-filename for data provided inline within
> - * the configuration file.
> - */
> -#define INLINE_FILE_TAG "[[INLINE]]"
> -
>  /*
>   * Script security warning
>   */
> diff --git a/src/openvpn/crypto.c b/src/openvpn/crypto.c
> index 672aa14a..f1a52d8c 100644
> --- a/src/openvpn/crypto.c
> +++ b/src/openvpn/crypto.c
> @@ -1189,7 +1189,7 @@ print_key_filename(const char *str, bool is_inline)
>  {
>      if (is_inline)
>      {
> -        return INLINE_FILE_TAG;
> +        return "[[INLINE]]";
>      }
>  
>      return np(str);
> 

This looks promising, but is not complete - and breaking compilation:


$ git grep INLINE_FILE_TAG
src/openvpn/tls_crypt.c:        client_filename = INLINE_FILE_TAG;

$ make -j5
[...]
make[3]: Entering directory `/home/davids/devel/OpenVPN/openvpn/src/openvpn'
  CC       tls_crypt.o
tls_crypt.c: In function ‘tls_crypt_v2_write_client_key_file’:
tls_crypt.c:706:27: error: ‘INLINE_FILE_TAG’ undeclared (first use in this
function)
         client_filename = INLINE_FILE_TAG;
                           ^

I haven't dug into if client_filename really needs to be set to INLINE_FILE_TAG.


-- 
kind regards,

David Sommerseth
OpenVPN Inc


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to