当我使用imaps连接到我的imap服务器时,它很脆弱.
你能告诉我如何忽略javamail中的服务器证书错误
Exception in thread "main"
javax.mail.MessagingException:
sun.security.validator.ValidatorException:
PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification
path to requested target; nested
exception is:
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException:
PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification
path to requested target at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:665)
at javax.mail.Service.connect(Service.java:295)
at javax.mail.Service.connect(Service.java:176)
at App20110204.main(App20110204.java:31)
Caused by:
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException:
PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification
path to requested target at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1623)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:198)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:192)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1074)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:128)
at …Run Code Online (Sandbox Code Playgroud) 我想在我的脚本顶部定义一个正则表达式常量,稍后再用它来检查日期字符串的格式.
我的日期字符串将被定义为
$ a ="2013-03-20 11:09:30.788";
但它失败了.我应该怎么做 ?
use strict;
use warnings;
use constant REGEXP1 => "/^\d{4}\D\d{2}\D\d{2}\D\d{2}\D\d{2}\D\d{2}\D\d{3}$/";
$a="2013-03-20 11:09:30.788";
if(not $a=~®EXP1){
print "not"
}else{
print "yes"
}
print "\n";
Run Code Online (Sandbox Code Playgroud) 当我使用NFSv3时,我可以使用showmount命令列出卷:
NAME showmount - 显示NFS服务器的安装信息
大纲/ usr/sbin/showmount [-adehv] [--all] [--directories] [--exports] [ - help] [--version] [host]
说明showmount在远程主机上查询mount守护程序,以获取有关该计算机上NFS服务器状态的信息.如果没有选项,showmount将列出从该主机挂载的客户端集.showmount的输出设计为看起来好像是通过''sort -u''处理的.
但是,似乎不会列出NFSv4卷.如何获取从远程主机导出的NFSv4卷列表?