0

I am trying to put samples in different languages for our clients to help them with one of our recent changes. I am new to PHP, so I would like to know how you could attach a certificate in your form post request to an URL end point ex: https://noName.com/dropOff. As the request is authenticated based on mutually agreed certificates.

The data dropped to the end point is in JSON. For simplicity lets assume the message dropped is { "data" : "value" }. I would assume the certificate that should be added to the HTTP POST request should be placed in some place in apache server in PEM format? any lines of sample code would be helpful.

The end point returns a data after accepting the JSON, lets assume the data returned is { "response" : "value"} . Appreciate your help. Thanks!

ioWint
  • 1,609
  • 3
  • 16
  • 34

1 Answers1

0

what you want is probably a cURL request from your form that way you can attach or send your certificates with the request. Also that way you don't expose your end point.

Reference overflow: CURL to pass SSL certifcate and password

Community
  • 1
  • 1
geggleto
  • 2,605
  • 1
  • 15
  • 18