@@ -624,7 +624,19 @@ show_remote_devices_and_exit(void)
624
624
#define z_FLAG_USAGE
625
625
#endif
626
626
627
- #define SHORTOPTS "aAbB:c:C:dDeE:fF:G:hHi:I" j_FLAG J_FLAG "KlLm:M:nNOpqQ:r:s:StT:uUvV:w:W:xXy:Y" z_FLAG "Z:#"
627
+ #ifdef HAVE_LIBCRYPTO
628
+ #define E_FLAG "E:"
629
+ #define E_FLAG_USAGE "[ -E algo:secret ] "
630
+ #define M_FLAG "M:"
631
+ #define M_FLAG_USAGE "[ -M secret ] "
632
+ #else
633
+ #define E_FLAG
634
+ #define E_FLAG_USAGE
635
+ #define M_FLAG
636
+ #define M_FLAG_USAGE
637
+ #endif
638
+
639
+ #define SHORTOPTS "aAbB:c:C:dDe" E_FLAG "fF:G:hHi:I" j_FLAG J_FLAG "KlLm:" M_FLAG "nNOpqQ:r:s:StT:uUvV:w:W:xXy:Y" z_FLAG "Z:#"
628
640
629
641
/*
630
642
* Long options.
@@ -1775,12 +1787,11 @@ main(int argc, char **argv)
1775
1787
++ ndo -> ndo_eflag ;
1776
1788
break ;
1777
1789
1790
+ #ifdef HAVE_LIBCRYPTO
1778
1791
case 'E' :
1779
- #ifndef HAVE_LIBCRYPTO
1780
- warning ("crypto code not compiled in" );
1781
- #endif
1782
1792
ndo -> ndo_espsecret = optarg ;
1783
1793
break ;
1794
+ #endif
1784
1795
1785
1796
case 'f' :
1786
1797
++ ndo -> ndo_fflag ;
@@ -1866,13 +1877,12 @@ main(int argc, char **argv)
1866
1877
}
1867
1878
break ;
1868
1879
1880
+ #ifdef HAVE_LIBCRYPTO
1869
1881
case 'M' :
1870
1882
/* TCP-MD5 shared secret */
1871
- #ifndef HAVE_LIBCRYPTO
1872
- warning ("crypto code not compiled in" );
1873
- #endif
1874
1883
ndo -> ndo_sigsecret = optarg ;
1875
1884
break ;
1885
+ #endif
1876
1886
1877
1887
case 'n' :
1878
1888
++ ndo -> ndo_nflag ;
@@ -3469,7 +3479,7 @@ print_usage(FILE *f)
3469
3479
(void )fprintf (f ,
3470
3480
"Usage: %s [-AbdDefhHI" J_FLAG "KlLnNOpqStuUvxX#] [ -B size ] [ -c count ] [--count]\n" , program_name );
3471
3481
(void )fprintf (f ,
3472
- "\t\t[ -C file_size ] [ -E algo:secret ] [ -F file ] [ -G seconds ]\n" );
3482
+ "\t\t[ -C file_size ] " E_FLAG_USAGE " [ -F file ] [ -G seconds ]\n" );
3473
3483
(void )fprintf (f ,
3474
3484
"\t\t[ -i interface ]" IMMEDIATE_MODE_USAGE j_FLAG_USAGE "\n" );
3475
3485
(void )fprintf (f ,
@@ -3479,7 +3489,7 @@ print_usage(FILE *f)
3479
3489
"\t\t" m_FLAG_USAGE "\n" );
3480
3490
#endif
3481
3491
(void )fprintf (f ,
3482
- "\t\t[ -M secret ] [ --number ] [ --print ]\n" );
3492
+ "\t\t" M_FLAG_USAGE " [ --number ] [ --print ]\n" );
3483
3493
(void )fprintf (f ,
3484
3494
"\t\t[ --print-sampling nth ] [ -Q in|out|inout ] [ -r file ]\n" );
3485
3495
(void )fprintf (f ,
0 commit comments