Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion How to set PEM Pass Phrase for HTTPS server

Received: by 10.42.142.202 with SMTP id t10mr5702843icu.4.1337311813489;
        Thu, 17 May 2012 20:30:13 -0700 (PDT)
X-BeenThere: mochiweb@googlegroups.com
Received: by 10.231.80.14 with SMTP id r14ls1059645ibk.4.gmail; Thu, 17 May
 2012 20:30:12 -0700 (PDT)
Received: by 10.50.178.68 with SMTP id cw4mr5910503igc.0.1337311812029;
        Thu, 17 May 2012 20:30:12 -0700 (PDT)
Received: by 10.50.178.68 with SMTP id cw4mr5910501igc.0.1337311812010;
        Thu, 17 May 2012 20:30:12 -0700 (PDT)
Return-Path: <barco....@bestv-intl.com>
Received: from mail-ob0-f174.google.com (mail-ob0-f174.google.com [209.85.214.174])
        by gmr-mx.google.com with ESMTPS id i8si1524889igl.2.2012.05.17.20.30.11
        (version=TLSv1/SSLv3 cipher=OTHER);
        Thu, 17 May 2012 20:30:11 -0700 (PDT)
Received-SPF: neutral (google.com: 209.85.214.174 is neither permitted nor denied by best guess record for domain of barco....@bestv-intl.com) client-ip=209.85.214.174;
Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.214.174 is neither permitted nor denied by best guess record for domain of barco....@bestv-intl.com) smtp.mail=barco....@bestv-intl.com
Received: by mail-ob0-f174.google.com with SMTP id tb18so3367627obb.19
        for <mochiweb@googlegroups.com>; Thu, 17 May 2012 20:30:11 -0700 (PDT)
        d=google.com; s=20120113;
        h=mime-version:x-originating-ip:in-reply-to:references:date
         :message-id:subject:from:to:content-type:x-gm-message-state;
        bh=PEVxeKq+066/2KtaeYJi/XuHijY23a52yESjoVqZ+vk=;
        b=omwzLLuubE1irsag1U3s80QLEDNVRGJ4IJGmfSGYVowFhUh9SRURKlnQsW0HHnW1LS
         KwyTTlvOBPYU8EcFOTcOdU8+lfSHQOLAaDEYLuWGyGWLheKO1ovVYeGYtMeinCQTNIR/
         sMQUKV1cL3xxhLueIQwnzf04GPAQTRTXR5tZ5Dv+adsW1OblT4oQGpAueYlaeww90REd
         zT1CzBg2i6fgDxgME0Yr5uyX6BfP0rh24DiQOoDrTi0jYWsc6KNKIbHIs4tVhqSdngAZ
         sdPIfcOUwOd9fdcuORr9GMNvhQRGhA4dLc1ht4pMjc/FjnGjU2AIVgkQQWqisS9AW8rw
         0EXA==
MIME-Version: 1.0
Received: by 10.182.167.39 with SMTP id zl7mr8844240obb.10.1337311811492; Thu,
 17 May 2012 20:30:11 -0700 (PDT)
Received: by 10.182.53.229 with HTTP; Thu, 17 May 2012 20:30:11 -0700 (PDT)
X-Originating-IP: [210.210.141.181]
In-Reply-To: <CACwMPm-p2akQoCQqkw9O0ouv8KgUecCTiVBAmr69uW6YCkv...@mail.gmail.com>
References: <1860529.1483.1337262440800.JavaMail.geo-discussion-forums@pbcgf3>
	<CACwMPm-WKG-UVpwv5wkg9bSD2BQwXi-1fnQunLbfu6fhfs9...@mail.gmail.com>
	<a1c9622a-f8ba-4a07-9b13-ff091158b5b3@googlegroups.com>
	<CACwMPm-p2akQoCQqkw9O0ouv8KgUecCTiVBAmr69uW6YCkv...@mail.gmail.com>
Date: Fri, 18 May 2012 11:30:11 +0800
Message-ID: <CAJeY7aFm0cUuX0+axqXf=XQX7uaamNX6bVVAkZZ=kJv1kKh...@mail.gmail.com>
Subject: Re: [mochiweb] How to set PEM Pass Phrase for HTTPS server
From: Barco You <barco....@bestv-intl.com>
To: mochiweb@googlegroups.com
Content-Type: multipart/alternative; boundary=e89a8f642c747a597d04c0472b52
X-Gm-Message-State: ALoCoQmOjiMFikEWTOzksHLh76VcA8jnN8PmGX0VUNrwIYLF6xuSjfVefRUBpcaVQiLP1Qz1V7e1

--e89a8f642c747a597d04c0472b52
Content-Type: text/plain; charset=ISO-8859-1

Hi Bob.

Thank you for very much!

On Fri, May 18, 2012 at 11:28 AM, Bob Ippolito <b...@redivi.com> wrote:

> Realistically, if SSL is important to you, I would recommend another web
> server. We always did SSL termination at the load balancer, so that's not
> the most exercised code. You should take a look at cowboy or yaws, I've
> used SSL in cowboy and it seems to work fine. Documentation isn't much
> better, but it's a more modern API that takes advantage of the binary
> features in newer versions of Erlang.
>
> On Thursday, May 17, 2012, Barco wrote:
>
>> And I think Mochiweb should have a tutorial about how to setup a https
>> server, including how to generate the certificate and key files, rather
>> than just putting a example with the files already generated there without
>> practical meaning.1
>>
>>
>> On Friday, May 18, 2012 12:15:19 AM UTC+8, Bob Ippolito wrote:
>>>
>>> On Thu, May 17, 2012 at 6:47 AM, Barco <barco....@bestv-intl.com> wrote:
>>>
>>>> Dear All,
>>>>
>>>> I want to setup a https server with mochiweb. First of all I need to
>>>> use openssl to generate certificate and private key files, and when I
>>>> generate these file I need to input a Pem pass phrase, so I hope to know
>>>> how can I set this passphrase in mochiweb ssl_opts. Otherwise the https
>>>> request will fail with ekeyfile error.
>>>>
>>>
>>> You don't actually need to put a passphrase on it, I believe you just
>>> press return when it asks you for one. You can also remove the passphrase
>>> from a certificate after you've generated it.
>>>
>>> # remove passphrase from key.pem and save in newkey.pem
>>> openssl rsa -in key.pem -out newkey.pem
>>>
>>> Anyway, looks like the option is {password, string()}
>>>
>>> http://www.erlang.org/doc/man/**ssl.html<http://www.erlang.org/doc/man/ssl.html>
>>>
>>> -bob
>>>
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "MochiWeb" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/mochiweb/-/kct_fBooLtwJ.
>> To post to this group, send email to mochiweb@googlegroups.com.
>> To unsubscribe from this group, send email to
>> mochiweb+unsubscribe@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/mochiweb?hl=en.
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "MochiWeb" group.
> To post to this group, send email to mochiweb@googlegroups.com.
> To unsubscribe from this group, send email to
> mochiweb+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/mochiweb?hl=en.
>



-- 
------------------
Best regards,
Barco

--e89a8f642c747a597d04c0472b52
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi Bob.<br><br>Thank you for very much!<br><br><div class=3D"gmail_quote">O=
n Fri, May 18, 2012 at 11:28 AM, Bob Ippolito <span dir=3D"ltr">&lt;<a href=
=3D"mailto:b...@redivi.com" target=3D"_blank">b...@redivi.com</a>&gt;</span> =
wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Realistically, if SSL is important to you, I=
 would recommend another web server. We always did SSL termination at the l=
oad balancer, so that&#39;s not the most exercised code. You should take a =
look at cowboy or yaws, I&#39;ve used SSL in cowboy and it seems to work fi=
ne. Documentation isn&#39;t much better, but it&#39;s a more modern API tha=
t takes advantage of the binary features in newer versions of Erlang.=A0<sp=
an></span><br>

<br>On Thursday, May 17, 2012, Barco  wrote:<br><blockquote class=3D"gmail_=
quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1=
ex">And I think Mochiweb should have a tutorial about how to setup a https =
server, including how to generate the certificate and key files, rather tha=
n just putting a example with the files already generated there without pra=
ctical meaning.1<br>

<br><br>On Friday, May 18, 2012 12:15:19 AM UTC+8, Bob Ippolito wrote:<bloc=
kquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-lef=
t:1px #ccc solid;padding-left:1ex"><div>On Thu, May 17, 2012 at 6:47 AM, Ba=
rco <span dir=3D"ltr">&lt;<a>barco....@bestv-intl.com</a>&gt;</span> wrote:=
</div>

<div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"=
margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear All,<br><br>I want to setup a https server with mochiweb. First of all=
 I need to use openssl to generate certificate and private key files, and w=
hen I generate these file I need to input a Pem pass phrase, so I hope to k=
now how can I set this passphrase in mochiweb ssl_opts. Otherwise the https=
 request will fail with ekeyfile error.<br>


</blockquote><div><br></div><div>You don&#39;t actually need to put a passp=
hrase on it, I believe you just press return when it asks you for one. You =
can also remove the passphrase from a certificate after you&#39;ve generate=
d it.</div>


<div><div><br></div><div># remove passphrase from key.pem and save in newke=
y.pem</div><div>openssl rsa -in key.pem -out newkey.pem</div></div><div><br=
></div><div>Anyway, looks like the option is=A0{password, string()}</div>


<div><br></div><div><a href=3D"http://www.erlang.org/doc/man/ssl.html" targ=
et=3D"_blank">http://www.erlang.org/doc/man/<u></u>ssl.html</a><div><br></d=
iv><div>-bob<br>=A0</div></div></div></div><span class=3D"HOEnZb"><font col=
or=3D"#888888">
</font></span></blockquote><span class=3D"HOEnZb"><font color=3D"#888888">

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;MochiWeb&quot; group.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/d/msg/mochiweb/-/kct_fBooLtwJ" target=3D"_blank">https://groups.google.c=
om/d/msg/mochiweb/-/kct_fBooLtwJ</a>.<br>=20
To post to this group, send email to <a>mochiweb@googlegroups.com</a>.<br>
To unsubscribe from this group, send email to <a>mochiweb+unsubscribe@googl=
egroups.com</a>.<br>

For more options, visit this group at <a href=3D"http://groups.google.com/g=
roup/mochiweb?hl=3Den" target=3D"_blank">http://groups.google.com/group/moc=
hiweb?hl=3Den</a>.<br>


</font></span></blockquote><span class=3D"HOEnZb"><font color=3D"#888888">

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;MochiWeb&quot; group.<br>
To post to this group, send email to <a href=3D"mailto:mochiweb@googlegroup=
s.com" target=3D"_blank">mochiweb@googlegroups.com</a>.<br>
To unsubscribe from this group, send email to <a href=3D"mailto:mochiweb%2B=
unsubscribe@googlegroups.com" target=3D"_blank">mochiweb+unsubscribe@google=
groups.com</a>.<br>

For more options, visit this group at <a href=3D"http://groups.google.com/g=
roup/mochiweb?hl=3Den" target=3D"_blank">http://groups.google.com/group/moc=
hiweb?hl=3Den</a>.<br>


</font></span></blockquote></div><br><br clear=3D"all"><br>-- <br>---------=
---------<br>Best regards,<br>Barco<br><br>

--e89a8f642c747a597d04c0472b52--