Develop and Download Open Source Software

Browse Subversion Repository

Contents of /checkvalid.bash

Parent Directory Parent Directory | Revision Log Revision Log


Revision 21 - (show annotations) (download)
Wed Feb 19 06:01:53 2020 UTC (4 years, 3 months ago) by elge
File size: 843 byte(s)
better iprev, count, and importing legacy san & valid

1 #!/bin/bash
2
3 [[ ! -f $HOME/masspie/cacert.pem ]] && echo $HOME/masspie/cacert.pem is required && exit 1
4
5 [[ -z $1 ]] && echo missing x\*.ptr.validcn file as first argument && exit 1
6 inputfile=$1
7
8 ehlo=pro5s2.nethence.com
9 #ehlo=`curl -s ip.nethence.com | sed -n 1p | awk '{print $NF}' | sed 's/\.$//'`
10
11 echo using $ehlo as EHLO and writing to $inputfile.return
12 for mx in `cat $inputfile`; do
13 echo -en "$mx\t"
14
15 #we only need the last result with 'Verify', as it repeats in parenthesis what 'Verification' said above
16 echo Q | timeout --preserve-status -k 5s 10s /usr/local/bin/openssl s_client -4 -showcerts -verify 5 -CAfile $HOME/masspie/cacert.pem -starttls smtp -name $ehlo -servername $mx -connect $mx:25 -crlf 2>/dev/null | grep Verify || echo
17 #-CApath /etc/ssl/certs
18 #-brief
19 #-verify_return_error
20 done > $inputfile.return; unset mx
21

Properties

Name Value
svn:executable *

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26