简体   繁体   English

签名证书和SSL

[英]Signed Certificate & SSL

I currently have a website hosted with Hostgator that has a java upload applet; 我目前在Hostgator托管的网站上有一个Java上传小程序; however, on page visit, the browser blocks the java applet from executing. 但是,在页面访问时,浏览器会阻止Java小程序执行。 Reason given is security settings have blocked a SELF-SIGNED application from running. 给出的原因是安全设置阻止了SELF-SIGNED应用程序的运行。

My question is, how can I get past this, WITHOUT modifying java security levels. 我的问题是,如何在不修改Java安全级别的情况下克服这一问题。 I want users to be able to access the applet without getting this error AND without having to modify any of their current browser settings. 我希望用户能够访问小程序而不会出现此错误,而不必修改任何当前的浏览器设置。

(I signed the applet myself using keytool). (我自己使用keytool签署了applet)。

Thank you. 谢谢。

There are two ways: 有两种方法:

  1. You need to buy a SSL certificate from a trusted party like Verisign or Thawte , or any other (cheaper) trusted provider . 您需要从VerisignThawte之类的受信任方或任何其他(更便宜的)受信任提供商处购买SSL证书。 Then you need to sign your applet with this certificate instead. 然后,您需要使用此证书来签署applet。 Since such certificate will be provided by a globally-trusted party, your users' JVM will automatically trust it. 由于此类证书将由全球信任的一方提供,因此用户的JVM将自动信任它。

    If you decide to go with the cheaper ssl provider, make sure it's root certificate is in the default list of trusted certificates of the JVM. 如果决定使用便宜的ssl提供程序,请确保它的根证书在JVM的受信任证书的默认列表中。 You can check that, by listing certificates, that come with the installation of Java - like this: 您可以通过列出Java安装随附的证书来进行检查,如下所示:

     keytool -list -keystore cacerts -storepass changeit 

    where changeit is the default cacerts keystore password, and the cacerts file can be found in lib\\security folder of jour JRE installation - on Windows this will be something like: 其中changeit是默认的cacerts密钥库密码,可以在jour JRE安装的lib\\security文件夹中找到cacerts文件-在Windows上,它将类似于:

     c:\\Program Files (x86)\\Java\\jre[version]\\lib\\security\\ 
  2. Send the public key to your users, and make them add it to trusted certificates of their JVM (usually that means, importing the certificate you provide to the aforementioned cacerts file. This step however requires using keytool and command line and will most likely be troublesome for most of your users. 将公共密钥发送给您的用户,并使他们将其添加到其JVM的受信任证书中(通常意味着将您提供的证书导入到上述cacerts文件中。但是,此步骤需要使用keytool和命令行,并且很可能很麻烦适用于大多数用户。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM