1#!/usr/bin/env perl
2# Determine if the given curl executable supports the 'openssl' SSL engine
3if ( $#ARGV != 0 )
4{
5    print "Usage: $0 curl-executable\n";
6    exit 3;
7}
8if (!open(CURL, "@ARGV[0] -s --engine list|"))
9{
10    print "Can't get SSL engine list\n";
11    exit 2;
12}
13while( <CURL> )
14{
15    exit 0 if ( /openssl/ );
16}
17close CURL;
18print "openssl engine not supported\n";
19exit 1;
20