Objective
This article describes how to create a certificate using OpenSSL in combination with a Windows Certificate Authority and transfer the certificate to a XenServer host.
To enable trusted SSL communication for XenServer management through XenCenter, XenDesktop, or any other product, a trusted certificate is required on the XenServer host. This method is similar to CTX128617 - How to Use IIS to Acquire SSL Certificates for XenServer, except OpenSSL is used to generate the certificate requests.
This method can be scripted to easily replace certificates after expiration, and also gives the ability to store the certificate key pair. Should a XenServer require rebuilding, there is no need to repeat the request process. Simply upload the archived key pair to the server.
The following steps simulate creating a certificate for a XenServer named “xenserver1” in the domain “domain.com”. The Certificate Authority is named CA1 on server DOMAINCA. The password used for the private key pair is “citrixpass”.
Instructions
Following are the requirements:
-
Microsoft Certificate Authority
Complete the following procedure:
-
Install OpenSSL on a workstation or server. Ensure that the user performing the certificate request has adequate permissions to request and issue certificates.
-
Create the certificate request and private key:
openssl req -newkey rsa:2048 -keyout xenserver1prvkey.pem -nodes -out xenserver1.req -subj /CN=xenserver1.domain.com/O=Organization/C=US/ST=GA/L=Atlanta
For more specifics on creating the request, refer to OpenSSL req commands. Adjust Common name, Organization, Country, State, and Location to reflect your information. If spaces exist in your information, use quotes to enclose the -subj arguments. -
Submit the request to Windows Certificate Authority using CertReq:
certreq -submit -binary -attrib "CertificateTemplate:WebServer" -config DOMAINCA\CA1 xenserver1.req xenserver1.cer
Windows Certificate Authorities only export certificates in Base64 or Binary encoding. Base64 is the default, so binary encoding requires the extra switch -binary.
For full CertReq syntax, refer to CertReq Command Line Reference -
Convert the issued certificate to PEM format:
openssl x509 -inform der -in xenserver1.cer -out xenserver1.pem -
Merge the issued certificate and private key into Pkcs12 format.
openssl pkcs12 -export -inkey xenserver1prvkey.pem -in xenserver1.pem -out xenserver1.pfx -passout pass:citrixpass -
Convert the Pkcs12 key pair into a PEM keypair for importing into XenServer.
openssl pkcs12 -in xenserver1.pfx -out xenserver1keypair.pem -nodes -password pass:citrixpass -
Transfer the key pair to XenServer. To get this file on to XenServer, this procedure uses WinSCP. A portable version is available for download here:
http://portableapps.com/apps/internet/winscp_portable -
Open WinSCP and start a session to your XenServer:
-
Browse to /etc/xensource/ in the right pane and the location with your PEM certificate in the left pane:
-
Xapi-ssl.pem is the certificate currently in use on your XenServer. Rename this file to?? “xapi-ssl.pem.original”.
-
To copy your new certificate, drag your PEM certificate from the left pane into the right pane. The following screen shot prompts for verification.
-
Rename the copied PEM file to “xapi-ssl.pem”.
-
For security, modify the properties of the file to Read Only as shown:
-
From the XenServer console, issue a restart command for the xapissl service:
-
Browse to your XenServer over https to verify your certificate is installed properly:
Supporto Citrix
Traduzione automatica
Questo articolo ?? ¨ stato tradotto da un sistema di traduzione automatica e non ?? ¨ stata valutata da persone. Citrix fornisce traduzione automatica per aumentare l'accesso per supportare contenuti; tuttavia, articoli automaticamente tradotte possono possono contenere degli errori. Citrix non ?? ¨ responsabile di incongruenze, errori o danni derivanti dell'uso di articoli automaticamente tradotte.
Citrix技術支持
自動翻譯
這篇文章被翻譯由一個自動翻譯系統,並沒有受到人們的審查。 Citrix提供自動翻譯,增加獲得支持的內容;但是,自動翻譯的文章可能可以包含錯誤。思傑不負責不一致,錯誤或損壞因使用自動翻譯的文章的結果。
Поддержка Citrix
Tradução automática
Эта статья была переведена автоматической системой перевода и не был рассмотрен людьми. Citrix обеспечивает автоматический перевод с целью расширения доступа для поддержки контента; Однако, автоматически переведенные статьи могут может содержать ошибки. Citrix не несет ответственности за несоответствия, ошибки, или повреждения, возникшие в результате использования автоматически переведенных статей.
시트릭스 지원
자동 번역
이 문서 자동 번역 시스템에 의해 번역 된 사람들에 의해 검토되지 않았다. 시트릭스는 컨텐츠를 지원하기 위해 접근을 높이기 위해 자동 번역을 제공합니다; 그러나, 자동으로 번역 기사 오류를 포함 할 수있다. 시트릭스는 자동으로 번역 된 기사의 사용의 결과로 발생하는 불일치, 오류 또는 손해에 대해 책임을지지 않습니다.