📄 verify-cn
字号:
#!/usr/bin/perl# Verify X509 Common Name## Return 0 if cn matches the common name component of X509_NAME_oneline,# 1 otherwise.## For example in openvpn, you could use the option:# --tls-verify "./verify-cn Test-Client"die "usage: verify-cn cn certificate_depth X509_NAME_oneline" if (@ARGV != 3);($cn, $depth, $x509) = @ARGV;if ($depth == 0) { if ($x509 =~ /\/CN=(.+)\//) { if ($cn eq $1) { exit 0; } } exit 1;}exit 0;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -