You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/11/19 09:38:50 UTC

[GitHub] [apisix] idbeta edited a comment on issue #2791: request help:

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


   It’s difficult to use curl to send the certificate content here. I suggest you use python, like the following
   ```python
   pem = '''-----BEGIN CERTIFICATE-----
   ... ...
   -----END CERTIFICATE-----'''
   
   key = '''-----BEGIN RSA PRIVATE KEY-----
   ... ...
   -----END RSA PRIVATE KEY-----'''
   
   cdata = {
       "id": "1",
       "cert": pem,
       "key": key,
       "snis": ["xxxx.org"]
   }
   
   headers = {
       "X-API-KEY": "edd1c9f034335f136f87ad84b625c8f1"
   }
   
   r = requests.put("http://127.0.0.1:9080/apisix/admin/ssl/1",json = cdata,headers=headers)
   print(r.text)
   ```


----------------------------------------------------------------
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:
users@infra.apache.org