starsz edited a comment on issue #2791:
URL: https://github.com/apache/apisix/issues/2791#issuecomment-730244979


   Hi, @Hmemories. You may have failed to get my point.
   What I mean is that, when you put your SSL certificate through 
`/apisix/admin/ssl/{id}`,
   the `cert` and `key` field in the request body should contain 
   ```
   -----BEGIN CERTIFICATE-----
   -----END CERTIFICATE-----
   ``` 
   
   Like this, Just put all the content in the SSL certificate to apisix.
   ```
   curl http://127.0.0.1:9080/apisix/admin/ssl/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "cert": "-----BEGIN CERTIFICATE-----
         ... 
   -----END CERTIFICATE-----",
       "key": "-----BEGIN RSA PRIVATE KEY-----
        ....
   -----END RSA PRIVATE KEY-----",
       "sni": "test.com"
   }'
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to