使用私有CA验证openssl证书

使用私有CA验证openssl证书,openssl,certificate,ssl-certificate,Openssl,Certificate,Ssl Certificate,我正在尝试编写一个bash脚本,然后用shc对其进行加密。我试图实现的是,我将构建我的私有CA,比如CA.example.com和中间CA,比如int.example.com,然后使用我自己的CA请求并签署服务器证书。 现在我想验证远程端的服务器crt和- if server.crt is signed by ca.example.com;then if server.crt -enddate is grater than current end;then execute te

我正在尝试编写一个bash脚本,然后用shc对其进行加密。我试图实现的是,我将构建我的私有CA,比如CA.example.com和中间CA,比如int.example.com,然后使用我自己的CA请求并签署服务器证书。 现在我想验证远程端的服务器crt和-

if server.crt is signed by ca.example.com;then
   if server.crt -enddate is grater than current end;then
      execute testing.sh [or my codes]
   else
       echo "may be certificate is expired and you are not authorized to run"
   fi
else
:
fi
基本上,我想验证使用openssl的服务器crt是否由example.com根ca签名并且没有过期,然后只运行我的代码。然后我可以用shc加密bash脚本,这样用户就不能操作代码了

在这里,我已经实现了结束日期和当前日期功能,但如果由我的私人ca签署,则无法实现。对此有何想法

使用更防篡改的openssl实现同样的目的还有其他想法吗

短暂性脑缺血发作 布拉森河