Skip to content

Custom responses using tls #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kurobeats opened this issue Sep 15, 2021 · 5 comments · Fixed by #62 or #74
Closed

Custom responses using tls #52

kurobeats opened this issue Sep 15, 2021 · 5 comments · Fixed by #62 or #74
Assignees
Labels
Priority: Low This issue can probably be picked up by anyone looking to contribute to the project, as an entry fix Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@kurobeats
Copy link

Forgive me if I've missed something but I'm trying to set up a web server that will respond to POST requests but I'd like to encrypt the communication. Here's my rule file:

rules:
  - match: hey 
    response: |
              HTTP/1.0 200 OK
              Server: httpd/2.0
              x-frame-options: SAMEORIGIN
              x-xss-protection: 1; mode=block
              Date: Fri, 16 Apr 2021 14:30:32 GMT
              Content-Type: text/html
              Connection: close

              hello

But when run with the following (a few I've tried), I get errors thrown from curl:

Server: simplehttpserver -tcp -rules rules.yaml -listen localhost:443
Request: $ curl -X hey https://localhost/ curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to localhost:443

Server: simplehttpserver -rules rules.yaml -tcp -tls -domain localhost -listen localhost:443
Request: $ curl -X hey https://localhost/ curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to localhost:443

Am I missing something? It works fine so long as I'm not trying to encrypt.

@cyal1
Copy link

cyal1 commented Sep 15, 2021

I also encountered this situation

server : simplehttpserver --https --listen 0.0.0.0:443 -cert example.com.pem -key example.com.key -rules test.yaml -tcp -tls

HTTP ERROR 502

@forgedhallpass forgedhallpass added the Type: Question A query or seeking clarification on parts of the spec. Probably doesn't need the attention of all. label Dec 2, 2021
@ehsandeep ehsandeep added Priority: Low This issue can probably be picked up by anyone looking to contribute to the project, as an entry fix Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. and removed Type: Question A query or seeking clarification on parts of the spec. Probably doesn't need the attention of all. labels Dec 3, 2021
@ehsandeep ehsandeep removed their assignment Dec 3, 2021
@Mzack9999 Mzack9999 linked a pull request Dec 21, 2021 that will close this issue
@Mzack9999 Mzack9999 self-assigned this Dec 21, 2021
@Mzack9999 Mzack9999 added the Status: Review Needed The issue has a PR attached to it which needs to be reviewed label Dec 21, 2021
@ehsandeep
Copy link
Member

@kurobeats @cyal1 this should be now fixed in the dev version with following PR - #62

@ehsandeep ehsandeep added Status: Completed Nothing further to be done with this issue. Awaiting to be closed. and removed Status: Review Needed The issue has a PR attached to it which needs to be reviewed labels Dec 23, 2021
@kurobeats
Copy link
Author

Thank you!

@kurobeats
Copy link
Author

oops haha

@kurobeats kurobeats reopened this Dec 23, 2021
@ehsandeep ehsandeep linked a pull request Apr 18, 2022 that will close this issue
@cyal1
Copy link

cyal1 commented Oct 3, 2022

@kurobeats @cyal1 this should be now fixed in the dev version with following PR - #62

It is not work use Custom Certificate Key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Low This issue can probably be picked up by anyone looking to contribute to the project, as an entry fix Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
5 participants