简体   繁体   English

如何在没有PEM编码的RSA私钥的Google Cloud Platform上设置SSL证书

[英]How to setup SSL certificate on Google Cloud Platform without PEM encoded RSA private key

I have bought SSL certificate and would like to install it on my website hosted on google cloud platform. 我已经购买了SSL证书,并希望将其安装在Google云平台托管的网站上。 I have successfully installed the certificate on my Microsoft IIS 8 server and when I visit https://example.com connection is secured. 我已经在Microsoft IIS 8服务器上成功安装了证书,并且当我访问https://example.com时,连接是安全的。 However, I suppose, I need to finish installing process according to this guide . 但是,我想我需要根据本指南完成安装过程。 This doc says I need to upload a new certificate on the page App Engine page. 这位医生说,我需要在App Engine页面上上传新证书。 But it accepts only PEM encoded RSA private key. 但是它仅接受PEM编码的RSA私钥。 The seller of this certificate didn't provide this key in a proper file type and all my attempts to convert it via OpenSLL failed. 证书的卖方未以适当的文件类型提供此密钥,并且我所有尝试通过OpenSLL进行转换的尝试均失败了。 Is there another way to setup this certificate without difficult converting procedure? 有没有其他方法可以设置此证书而无需进行困难的转换过程?

To get the PEM and RSA key files required for the App Engine, do this: 要获取App Engine所需的PEM和RSA密钥文件,请执行以下操作:

  • Export the certificate from the IIS server in a PFX format (eg. server.pfx) 以PFX格式(例如server.pfx)从IIS服务器导出证书。
  • Transfer the file to a computer that has OpenSSL 将文件传输到具有OpenSSL的计算机
  • Execute: openssl pkcs12 -in server.pfx -nokeys -out server.pem 执行: openssl pkcs12 -in server.pfx -nokeys -out server.pem
  • Execute: openssl pkcs12 -in server.pfx -nocerts -out server.key 执行: openssl pkcs12 -in server.pfx -nocerts -out server.key
  • Execute: openssl rsa -in server.key -out server-no-password.key 执行: openssl rsa -in server.key -out server-no-password.key

Use the server.pem and server-no-password.key in your App Engine 在App Engine中使用server.pem和server-no-password.key

As Dan Cornilescu mentioned openssl rsa -in <your_key_file> -text > <your_key_file>.pem is the way to convert request file. 正如Dan Cornilescu提到的openssl rsa -in <your_key_file> -text > <your_key_file>.pem是转换请求文件的方式。 If u got an error "Unable to load Private Key. Expecting any private key" the way to fix it is to replace ">" for "-out" 如果您收到错误消息“无法加载私钥。需要任何私钥”,则解决方法是将“-”替换为“ -out”

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

相关问题 无法在Google Cloud Platform上删除域或上传新的​​SSL证书 - Cannot remove a domain or upload a new SSL certificate on Google Cloud Platform 我实际使用 Google Cloud Platform 中服务帐户的私钥的哪一部分? - Which part of the private key for service accounts in Google Cloud Platform do I actually use? 在Google App Engine Python SDK上使用RSA私钥对字符串进行签名 - Signing a string with RSA private key on Google App Engine Python SDK 如何登录到Google Cloud Platform - how to Sign in to Google Cloud Platform GCP SSL 证书安装错误“证书数据无效。请确保私钥和公共证书匹配 - GCP SSL Certificate Installation Error "The Certificate data is invalid. Please ensure that the private key and public certificate match 如何设置Google Cloud Platform App Engine实例的运行状况通知? - How do I setup health notifications for Google Cloud Platform App Engine Instances? Google Cloud Platform更新的SSL证书停止了应用的投放 - Google Cloud Platform renewed SSL cert stops app from serving 如何在Google Cloud Platform中清除Stackdriver日志? - How to clear Stackdriver logs in Google Cloud Platform? 如何在Google Cloud Platform中存储变量 - How to store variables in Google Cloud Platform Google云端平台上的聚合物入门套件 - 操作方法 - Polymer Starter Kit on Google Cloud Platform - How To
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM