FAQ
Right now I'm trying to get secure communication between a go server and a
chrome extension and having issues figuring out how I could give the
listenandserveTLS two byte arrays held in memory as the cert and key
instead of a file name.

I'd really prefer to use the simple listenandserveTLS instead of rolling my
own because that could create many points of failure and would obviously
invalidate the purpose of using tls.

Thanks.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Shivakumar GN at Aug 10, 2013 at 5:56 am
    http.ListenAndServeTLS() is only a convenience function & requires filename
    to be passed.

    If instead of filename you would like to pass []byte, you need to rollout
    your own identical to ListenAndServeTLS that uses tls.X509KeyPair() instead
    of tls.LoadX509KeyPair()
    If you have multiple certificates, then again, you need to rollout your own
    since ListenAndServeTLS presumes 1 cert/key pair.


    On Sat, Aug 10, 2013 at 12:14 AM, wrote:

    Right now I'm trying to get secure communication between a go server and a
    chrome extension and having issues figuring out how I could give the
    listenandserveTLS two byte arrays held in memory as the cert and key
    instead of a file name.

    I'd really prefer to use the simple listenandserveTLS instead of rolling
    my own because that could create many points of failure and would obviously
    invalidate the purpose of using tls.

    Thanks.

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Kyleveb at Aug 10, 2013 at 5:07 pm
    Dang, I was hoping to avoid that. Oh well. It'll be a interesting to mod
    the standard lib for the first time.
    On Friday, August 9, 2013 11:56:43 PM UTC-6, Shivakumar GN wrote:

    http.ListenAndServeTLS() is only a convenience function & requires
    filename to be passed.

    If instead of filename you would like to pass []byte, you need to rollout
    your own identical to ListenAndServeTLS that uses tls.X509KeyPair() instead
    of tls.LoadX509KeyPair()
    If you have multiple certificates, then again, you need to rollout your
    own since ListenAndServeTLS presumes 1 cert/key pair.


    On Sat, Aug 10, 2013 at 12:14 AM, <kyl...@gmail.com <javascript:>> wrote:

    Right now I'm trying to get secure communication between a go server and
    a chrome extension and having issues figuring out how I could give the
    listenandserveTLS two byte arrays held in memory as the cert and key
    instead of a file name.

    I'd really prefer to use the simple listenandserveTLS instead of rolling
    my own because that could create many points of failure and would obviously
    invalidate the purpose of using tls.

    Thanks.

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • DisposaBoy at Aug 11, 2013 at 1:45 pm
    I'm not in a position to check, but I'm almost certain you don't need to touch the stdlib . Just copy the existing functon and change to do what you need

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Kyleveb at Aug 11, 2013 at 6:46 pm
    Oh, then that's absolutely perfect.. It appears that I could just change a
    single function call from listenandservetls to get the job done. Much
    easier.
    On Sunday, August 11, 2013 7:45:05 AM UTC-6, DisposaBoy wrote:

    I'm not in a position to check, but I'm almost certain you don't need to
    touch the stdlib . Just copy the existing functon and change to do what you
    need
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedAug 10, '13 at 1:47a
activeAug 11, '13 at 6:46p
posts5
users3
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase