<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Upload CA Signed OneView Certificate in HPE OneView</title>
    <link>https://community.hpe.com/t5/hpe-oneview/upload-ca-signed-oneview-certificate/m-p/7194092#M8340</link>
    <description>&lt;P style="margin: 0;"&gt;Hello,&lt;/P&gt;
&lt;P style="margin: 0;"&gt;To delete the cretificates below are the steps.&lt;/P&gt;
&lt;P style="margin: 0;"&gt;Log into the OneView User Interface (UI).&lt;BR /&gt;Select OneView -&amp;gt; Settings.&lt;BR /&gt;Scroll under "Security" and click the "Manage Certificates" link.&lt;BR /&gt;Delete the unwanted certificate.&lt;BR /&gt;Wait for the deletion(s) to be completed.&lt;BR /&gt;Close the UI.&lt;/P&gt;
&lt;P style="margin: 0;"&gt;We are not sure about the certificate you are talking about. We would suggest you to review the certificate and then delete it if it is not required.&lt;BR /&gt;Cheers...&lt;/P&gt;</description>
    <pubDate>Mon, 14 Aug 2023 04:45:00 GMT</pubDate>
    <dc:creator>MV3</dc:creator>
    <dc:date>2023-08-14T04:45:00Z</dc:date>
    <item>
      <title>Upload CA Signed OneView Certificate</title>
      <link>https://community.hpe.com/t5/hpe-oneview/upload-ca-signed-oneview-certificate/m-p/7193862#M8322</link>
      <description>&lt;P&gt;I'm having a little trouble with the last part of renewing our OneView appliance server certficate.&amp;nbsp; I can generate the CSR and submit it to our CA for signature.&amp;nbsp; I get back the signed certificate in base64 encoded format and paste into &amp;lt;oneview hostname&amp;gt;.cer.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SCRT=&amp;lt;oneview hostname&amp;gt;.cer
# Change the line feeds to '\n':
SCRTN=$(cat ${SCRT} | awk '{ printf "%s\\n", $0 }')
# Add a leading newline:
SCRTN="\n${SCRTN}"
#
# Post to the OneView appliance:
CERTURI=$(curl --insecure --silent \
      --header "content-type: application/json" \
      --header "X-API-Version" ${currentVersion}" \
      --header "auth: ${sessionID}" \
      --data '{ "base64Data":"${SCRTN}" }' \
      --request PUT ${OneView}/rest/certificates/https | jq -r '.uri')
#
# Check the task status:
curl --insecure --silent \
     --header "X-API-Version" ${currentVersion}" \
      --header "auth: ${sessionID}" \
      --request GET ${OneView}${CERTURI} | jq -r '.'
#&lt;/LI-CODE&gt;&lt;P&gt;It always says the certificate is not a valid X.509 certificate.&amp;nbsp; The &lt;A href="https://techlibrary.hpe.com/docs/enterprise/servers/oneview8.2/cic-api/en/index.html#appliance-certificates" target="_blank" rel="noopener"&gt;API Reference&lt;/A&gt; shows the newlines are replaced with '\n' in the certificate uploaded.&amp;nbsp; If I upload the certificate via the gui, it works.&amp;nbsp; So, what am I doing wrong?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 03:57:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/upload-ca-signed-oneview-certificate/m-p/7193862#M8322</guid>
      <dc:creator>bradawk1</dc:creator>
      <dc:date>2023-08-10T03:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CA Signed OneView Certificate</title>
      <link>https://community.hpe.com/t5/hpe-oneview/upload-ca-signed-oneview-certificate/m-p/7193878#M8327</link>
      <description>&lt;P&gt;As long as you have the base64 value of the certificate in string format, you do replace the EOL with "\n".&amp;nbsp; Do not forget to include the ending "\n" after the "---END CERTIFICATE---" keyword.&lt;/P&gt;&lt;P&gt;Can you provide an example of the certificate here?&amp;nbsp; Feel free to replace specific letters to alternate values, or other ways to obscure the text of the body without making it difficult to review the overall format.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 16:13:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/upload-ca-signed-oneview-certificate/m-p/7193878#M8327</guid>
      <dc:creator>ChrisLynch</dc:creator>
      <dc:date>2023-08-09T16:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CA Signed OneView Certificate</title>
      <link>https://community.hpe.com/t5/hpe-oneview/upload-ca-signed-oneview-certificate/m-p/7193951#M8330</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;Those servers are not connected to the Internet.&amp;nbsp; I'd have to re-type and would most likely make lots of typos anyway.&amp;nbsp; It is a valid certificate.&amp;nbsp; If I run:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;cat ${SCRT} | openssl x509 -noout -text&lt;/LI-CODE&gt;&lt;P&gt;I get valid certificate information.&amp;nbsp; The awk command takes each line, prints it and adds a '\n' at the end.&amp;nbsp; Since it is a printf function, no automatic line feed is printed.&amp;nbsp; So, it all winds up on one line with '\n' in place of the line feeds.&amp;nbsp; The next line (of my code) just adds a '\n' at the begginning.&amp;nbsp; If I run:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;echo ${SCRTN} | wc -l&lt;/LI-CODE&gt;&lt;P&gt;I get 1 which is what I would expect.&amp;nbsp; It is one line.&lt;/P&gt;&lt;P&gt;I went back and looked at the &lt;A href="https://techlibrary.hpe.com/docs/enterprise/servers/oneview8.2/cic-api/en/index.html#appliance-certificates" target="_blank" rel="noopener"&gt;Vs 5000 REST API Reference&lt;/A&gt; and in the Request Body, base64Data section, it shows format-----BEGIN CERTIFICATE----- encoded data here -----END CERTIFICATE-----.&amp;nbsp; Which to my reading implies no '\n's at all.&amp;nbsp; So, I tried it that way.&amp;nbsp; Still get back not a valid X.509 format.&amp;nbsp; &lt;LI-EMOJI id="lia_disappointed-face" title=":disappointed_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 09:22:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/upload-ca-signed-oneview-certificate/m-p/7193951#M8330</guid>
      <dc:creator>bradawk1</dc:creator>
      <dc:date>2023-08-10T09:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CA Signed OneView Certificate</title>
      <link>https://community.hpe.com/t5/hpe-oneview/upload-ca-signed-oneview-certificate/m-p/7193965#M8332</link>
      <description>&lt;P&gt;When I downloaded the current certificate from the appliance, it had a single space every where one would expect a newline (or '\n').&amp;nbsp; So, I tried uploading in that format, but still got the same error.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 11:22:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/upload-ca-signed-oneview-certificate/m-p/7193965#M8332</guid>
      <dc:creator>bradawk1</dc:creator>
      <dc:date>2023-08-10T11:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CA Signed OneView Certificate</title>
      <link>https://community.hpe.com/t5/hpe-oneview/upload-ca-signed-oneview-certificate/m-p/7194036#M8337</link>
      <description>&lt;P&gt;Also, related:&amp;nbsp; I tested this from four of our OneView appliances.&amp;nbsp; Downloaded the current server certificate with:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl --insecure --silent --header "X-API-Version: ${currentVersion}" --header "auth: ${sessionID}" \
   --request GET ${OneView}/rest/certificates/https | jq -r '.base64Data'&lt;/LI-CODE&gt;&lt;P&gt;and for each one I get two certificates.&amp;nbsp; One is the one I got signed by our CA.&amp;nbsp; The other says it is signed by our CA but it has a serial number much shorter than we normally see and the lifetime of the certificate is much longer than we normally get.&amp;nbsp; Any idea what the second certificate is?&amp;nbsp; Do I need it?&amp;nbsp; If not, how do I remove it?&amp;nbsp; In the gui, how do I see the server certificates downloaded from this REST location?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 13:16:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/upload-ca-signed-oneview-certificate/m-p/7194036#M8337</guid>
      <dc:creator>bradawk1</dc:creator>
      <dc:date>2023-08-11T13:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CA Signed OneView Certificate</title>
      <link>https://community.hpe.com/t5/hpe-oneview/upload-ca-signed-oneview-certificate/m-p/7194092#M8340</link>
      <description>&lt;P style="margin: 0;"&gt;Hello,&lt;/P&gt;
&lt;P style="margin: 0;"&gt;To delete the cretificates below are the steps.&lt;/P&gt;
&lt;P style="margin: 0;"&gt;Log into the OneView User Interface (UI).&lt;BR /&gt;Select OneView -&amp;gt; Settings.&lt;BR /&gt;Scroll under "Security" and click the "Manage Certificates" link.&lt;BR /&gt;Delete the unwanted certificate.&lt;BR /&gt;Wait for the deletion(s) to be completed.&lt;BR /&gt;Close the UI.&lt;/P&gt;
&lt;P style="margin: 0;"&gt;We are not sure about the certificate you are talking about. We would suggest you to review the certificate and then delete it if it is not required.&lt;BR /&gt;Cheers...&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 04:45:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/upload-ca-signed-oneview-certificate/m-p/7194092#M8340</guid>
      <dc:creator>MV3</dc:creator>
      <dc:date>2023-08-14T04:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CA Signed OneView Certificate</title>
      <link>https://community.hpe.com/t5/hpe-oneview/upload-ca-signed-oneview-certificate/m-p/7194111#M8341</link>
      <description>&lt;P&gt;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1940151"&gt;@MV3&lt;/a&gt;&amp;nbsp; &lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1458"&gt;@ChrisLynch&lt;/a&gt;&amp;nbsp; OK, a few things:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;My topic is about using the REST API.&amp;nbsp; I have two related questions.&amp;nbsp; If the answer to the second one is to use the GUI, then that is fine.&lt;/LI&gt;
&lt;LI&gt;My most pressing issue is in regards to the appliance server certificate.&amp;nbsp; I'm trying to upload a signed certifcate using PUT ${OneView}/rest/certificates/https, but it always tells me that the certificate is invalid when I know it is valid.&amp;nbsp; I've tried changing all of the new lines to '\n' and ' ' and neither worked.&lt;/LI&gt;
&lt;LI&gt;When pulling the current appliance server certificate using GET ${OneView}/rest/certificates/https I get two certificates.&amp;nbsp; One is valid, the other looks almost valid, but has some discrepancies.&amp;nbsp; So, trying to figure out what the second one is?&lt;/LI&gt;
&lt;LI&gt;Two things about the gui path you depicted:
&lt;OL&gt;
&lt;LI&gt;I've never seen the appliance certificate in that path.&lt;/LI&gt;
&lt;LI&gt;It only shows the first 100 certificates.&amp;nbsp; I'm not sure how to see the rest?&lt;/LI&gt;
&lt;LI&gt;I do see the appliance certificate OneView -&amp;gt; Settings -&amp;gt; Security and scroll down to Appliance certificate.&amp;nbsp; There I only see the current signed certificate, not two.&amp;nbsp; So, just trying to figure out what is the second certificate; do I need it?; if not, how to get rid of it?&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Wed, 16 Aug 2023 08:50:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/upload-ca-signed-oneview-certificate/m-p/7194111#M8341</guid>
      <dc:creator>bradawk1</dc:creator>
      <dc:date>2023-08-16T08:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CA Signed OneView Certificate</title>
      <link>https://community.hpe.com/t5/hpe-oneview/upload-ca-signed-oneview-certificate/m-p/7196007#M8407</link>
      <description>&lt;P&gt;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1458"&gt;@ChrisLynch&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1940151"&gt;@MV3&lt;/a&gt;&amp;nbsp;Here is an example certificate.&amp;nbsp; How would the JSON be formatted to upload it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{"base64Data":...}&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;-----BEGIN CERTIFICATE-----
MIIFEDCCBLagAwIBAgIQD1oKDuqLztsPaAHCwdd2cjAKBggqhkjO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Qw
DAYDVR0TAQH/BAIwADCCAX0GCisGAQQB1nkCBAIEggFtBIIBaQFnAHYArfe++nz/
EMiLnT2cHj4YarRnKV3PsQwkyoWGNOvcgooAAAGKEIHUjgAABAMARzBFAiAJusYm
usT8WdhtcpIzTxF2V8fTAHUJPO+Ei/qhLMWxDgIhANl8UPWVCnJv4X+9QNMGgYDx
gLGfrAXwSsXWOB/oj/nRAHQAejKMVNi3LbYg6jjgUh7phBZwMhOFTTvSK8E6V6NS
61IAAAGKEIHT9AAABAMARTBDAh86EJCJ4tO/3XPee4v2MJTlBj6SB4drOm3k0XWV
zdxeAiACJ48gSLa/YlNJgynpMjhI+UQTdXY9q7nbLgg77YHfCQB3ALc++yTfnE26
dfI5xbpY9Gxd/ELPep81xJ4dCYEl7bSZAAABihCB0/IAAAQDAEgwRgIhAPWdvDFG
Vm4rBPPFS5Hy8ozItrQZ8XGwrPIHKkQZ+ID0AiEAnq1e22khS+2dubbMpunr95Hx
3eeINIJQHANMJ9sFBkcwCgYIKoZIzj0EAwIDSAAwRQIgZBgqdHAa5+TdP+Dq3dBb
bZul+threyO+SVaKuj5vWlACIQCCca3F+VMJxo44/bUvN3OavgvwAdmQ0GfWuaNz
IRTi3A==
-----END CERTIFICATE-----&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I am reading the documentation correctly, it should look like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{"base64Data":"\n-----BEGIN CERTIFICATE-----\nMIIFEDCCBLagAwIBAgIQD1oKDuqLztsPaAHCwdd2cjAKBggqhkjOPQQDAjBKMQsw\nCQYDVQQGEwJVUzEZMBcGA1UEChMQQ2xvdWRmbGFyZSwgSW5jLjEgMB4GA1UEAxMX\nQ2xvdWRmbGFyZSBJbmMgRUNDIENBLTMwHhcNMjMwODIwMDAwMDAwWhcNMjMxMTE4\nMjM1OTU5WjBqMQswCQYDVQQGEwJVU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xDgIhANl8UPWVCnJv4X+9QNMGgYDx\ngLGfrAXwSsXWOB/oj/nRAHQAejKMVNi3LbYg6jjgUh7phBZwMhOFTTvSK8E6V6NS\n61IAAAGKEIHT9AAABAMARTBDAh86EJCJ4tO/3XPee4v2MJTlBj6SB4drOm3k0XWV\nzdxeAiACJ48gSLa/YlNJgynpMjhI+UQTdXY9q7nbLgg77YHfCQB3ALc++yTfnE26\ndfI5xbpY9Gxd/ELPep81xJ4dCYEl7bSZAAABihCB0/IAAAQDAEgwRgIhAPWdvDFG\nVm4rBPPFS5Hy8ozItrQZ8XGwrPIHKkQZ+ID0AiEAnq1e22khS+2dubbMpunr95Hx\n3eeINIJQHANMJ9sFBkcwCgYIKoZIzj0EAwIDSAAwRQIgZBgqdHAa5+TdP+Dq3dBb\nbZul+threyO+SVaKuj5vWlACIQCCca3F+VMJxo44/bUvN3OavgvwAdmQ0GfWuaNz\nIRTi3A==\n-----END CERTIFICATE-----\n"}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but that does not work.&amp;nbsp; I've tried without the leading and trailing '\n' but that also does not work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 06:12:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/upload-ca-signed-oneview-certificate/m-p/7196007#M8407</guid>
      <dc:creator>bradawk1</dc:creator>
      <dc:date>2023-09-08T06:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Upload CA Signed OneView Certificate</title>
      <link>https://community.hpe.com/t5/hpe-oneview/upload-ca-signed-oneview-certificate/m-p/7196104#M8419</link>
      <description>&lt;P&gt;I figured it out.&amp;nbsp; In my original code, I had specified the data portion of the curl command as:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;--data '{ "base64Data":"${SCRTN}" }'&lt;/LI-CODE&gt;&lt;P&gt;when I put that value in a variable and then just sent the variable:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SCRT=&amp;lt;oneview hostname&amp;gt;.cer
# Change the line feeds to '\n':
SCRTN=$(cat ${SCRT} | awk '{ printf "%s\\n", $0 }')
# Add leading '\n':
SCRTN="\\n${SCRTN}"
#
DATA='{ "base64Data":"${SCRTN}" }'
#
# Post to the OneView appliance:
CERTURI=$(curl --insecure --silent \
      --header "content-type: application/json" \
      --header "X-API-Version" ${currentVersion}" \
      --header "auth: ${sessionID}" \
      --data "${DATA}" \
      --request PUT ${OneView}/rest/certificates/https | jq -r '.uri')
#
# Check the task status:
curl --insecure --silent \
     --header "X-API-Version" ${currentVersion}" \
      --header "auth: ${sessionID}" \
      --request GET ${OneView}${CERTURI} | jq -r '.'
#&lt;/LI-CODE&gt;&lt;P&gt;It worked.&amp;nbsp; Not sure why that would make a difference?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 10:12:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/upload-ca-signed-oneview-certificate/m-p/7196104#M8419</guid>
      <dc:creator>bradawk1</dc:creator>
      <dc:date>2023-09-08T10:12:21Z</dc:date>
    </item>
  </channel>
</rss>

