test307.pl 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/usr/bin/env perl
  2. #***************************************************************************
  3. # _ _ ____ _
  4. # Project ___| | | | _ \| |
  5. # / __| | | | |_) | |
  6. # | (__| |_| | _ <| |___
  7. # \___|\___/|_| \_\_____|
  8. #
  9. # Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  10. #
  11. # This software is licensed as described in the file COPYING, which
  12. # you should have received as part of this distribution. The terms
  13. # are also available at https://curl.se/docs/copyright.html.
  14. #
  15. # You may opt to use, copy, modify, merge, publish, distribute and/or sell
  16. # copies of the Software, and permit persons to whom the Software is
  17. # furnished to do so, under the terms of the COPYING file.
  18. #
  19. # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  20. # KIND, either express or implied.
  21. #
  22. ###########################################################################
  23. # Determine if the given curl executable supports the 'openssl' SSL engine
  24. if ( $#ARGV != 0 )
  25. {
  26. print "Usage: $0 curl-executable\n";
  27. exit 3;
  28. }
  29. if (!open(CURL, "@ARGV[0] -s --engine list|"))
  30. {
  31. print "Can't get SSL engine list\n";
  32. exit 2;
  33. }
  34. while( <CURL> )
  35. {
  36. exit 0 if ( /openssl/ );
  37. }
  38. close CURL;
  39. print "openssl engine not supported\n";
  40. exit 1;