Jump to content




Using HTTPS to POST


  • You cannot reply to this topic
4 replies to this topic

#1 Forgotten_Boy

  • Members
  • 72 posts
  • LocationOntario, Canada

Posted 09 June 2015 - 07:00 AM

I'm using ComputerCraft 1.73 and making a secure http POST to my local web server like this:
http.post("https://localhost"...

and my server (which, for the record, works fine serving HTTP and HTTPS requests to browsers without any trouble) shows this error when the CC POST arrives:
code 336151574: error:14094416:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate unknown,
code 336150757: error:140940E5:SSL routines:SSL3_READ_BYTES:ssl handshake failure


Admittedly this is almost certainly a server-side error but I thought I'd ask in case someone here had seen it. I've read here that CC is used with HTTPS without problems to other servers so I'm hoping someone might have some info. I assumed that CC would be using credentials provided by Java which would then be using my browser credentials and therefore the CC HTTPS request wouldn't look any different than a browser request; evidently that is not the case.

Anyway, if it's not too off-topic for the pros then even your random guesses would be appreciated!

#2 doublequestionmark

  • Members
  • 118 posts
  • LocationI honestly don't know

Posted 18 June 2015 - 02:57 AM

View PostForgotten_Boy, on 09 June 2015 - 07:00 AM, said:

--snip--
code 336151574: error:14094416:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate unknown,
code 336150757: error:140940E5:SSL routines:SSL3_READ_BYTES:ssl handshake failure
--snip--

i've seen this before, you need an ssl cert signed by a trusted CA.

if your running apache on a ubuntu server, here's a great tutorial on how to obtain one for free and configure it with apache

Edited by doublequestionmark, 18 June 2015 - 02:59 AM.


#3 Anavrins

  • Members
  • 775 posts

Posted 18 June 2015 - 05:58 AM

That or you can make your OS trust your self-signed CA certificate.

#4 Forgotten_Boy

  • Members
  • 72 posts
  • LocationOntario, Canada

Posted 19 June 2015 - 05:11 AM

Thanks for replying! I'm going to try it shortly with a real certificate, I was just hoping someone would be able to comment on the Java part - presumably CC is sending Java credentials and this is somehow different than what the browser would do - as my current server serves HTTPS to browsers no problem (at localhost), just not to CC. But I'll see what happens when I use a proper cert hosted at the domain name, which I assume is the use case everyone here has when they say that HTTPS and CC is no problem for them.

#5 Anavrins

  • Members
  • 775 posts

Posted 19 June 2015 - 10:55 PM

Yeah, but that's because you have a self-signed certificate, on browsers you can chose to ignore the security warning, but in this case, it's a bit difficult to do in CC.
There are tutorials on google on how to make your OS trust your self-signed CA cert.





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users