Pyro4 ver 4.35 hmac key config not symmetric

Katelyn Thode <[email protected]> Fri, 10 Apr 2015 13:23:50 -0700
Newsgroups gmane.comp.python.pyro
Message-ID <CAODs+1PL-C1hE542AzSb4ibbZ5mJCDobRbQr4VkE-yZ6cJFUmw@mail.gmail.com>
--===============7872088507132256753==
Content-Type: multipart/alternative; boundary=001a113f9224d8123f0513648a90

--001a113f9224d8123f0513648a90
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hello,

I am having an issue when attempting to set up the hmac key for Pyro4 in
code.  The versions being used are as follows:
Pyro 4: 4.35
Python: 2.7.9

The error message is:
Pyro4.errors.SecurityError: hmac key config not symmetric

The code that is being used is below:
daemon =3D Pyro4.Daemon(*IP*)
key =3D str(*self*.get_hmac_key())
daemon._pyroHmacKey =3D key
nameServer =3D Pyro4.locateNS(*IP*)
nameServer._pyroHmacKey =3D key
uri =3D daemon.register(*self*)
nameServer.register(name, uri)

get_hmac_key():
     key =3D =E2=80=9Ctest1"
     msg =3D =E2=80=9Ctest2"
     hmac_obj =3D hmac.new(key, msg, hashlib.sha256)
     hmac_key =3D hmac_obj.hexdigest()
     return hmac_key

The line that the error is thrown at is nameServer.register(name, uri).
Please advise on what I am doing incorrectly.

Thanks,
Katelyn

--001a113f9224d8123f0513648a90
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hello,<div><br></div><div>I am having an issue when attemp=
ting to set up the hmac key for Pyro4 in code.=C2=A0 The versions being use=
d are as follows:</div><div>Pyro 4: 4.35</div><div>Python: 2.7.9</div><div>=
<br></div><div>The error message is:=C2=A0</div><div>Pyro4.errors.SecurityE=
rror: hmac key config not symmetric</div><div><br></div><div>The code that =
is being used is below:</div><div><div><span style=3D"font-stretch:normal;f=
ont-size:10px;font-family:Consolas">daemon =3D Pyro4.Daemon(</span><span st=
yle=3D"font-size:10px;font-family:Consolas"><i>IP</i>)</span></div><div><sp=
an style=3D"font-size:10px"><span style=3D"font-family:Consolas">key =3D st=
r(<i>self</i>.get_hmac_key())</span></span></div><div><span style=3D"font-s=
ize:10px"><span style=3D"font-family:Consolas">daemon._pyroHmacKey =3D key<=
/span></span></div><div><span style=3D"font-size:10px"><span style=3D"font-=
family:Consolas">nameServer =3D Pyro4.locateNS(<i>IP</i>)</span></span></di=
v><div><span style=3D"font-size:10px"><span style=3D"font-family:Consolas">=
nameServer._pyroHmacKey =3D key</span></span></div><div><span style=3D"font=
-size:10px"><span style=3D"font-family:Consolas">uri =3D daemon.register(<i=
>self</i>)</span></span></div><div><span style=3D"font-family:Consolas"><sp=
an style=3D"font-size:10px">nameServer.register(name, uri)</span></span></d=
iv><div><span style=3D"font-size:10px"><span style=3D"font-family:Consolas"=
><br></span></span></div><div><font face=3D"Consolas" size=3D"1">get_hmac_k=
ey():</font></div><div><font face=3D"Consolas" size=3D"1">=C2=A0 =C2=A0 =C2=
=A0key =3D=C2=A0=E2=80=9Ctest1&quot;</font></div><div><font face=3D"Consola=
s" size=3D"1">=C2=A0 =C2=A0 =C2=A0msg =3D=C2=A0=E2=80=9Ctest2&quot;</font><=
br></div><div><span style=3D"font-size:10px"><span style=3D"font-family:Con=
solas">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0hmac_obj =3D hmac.new(key, msg, hashli=
b.sha256)</span></span></div><div><span style=3D"font-size:10px"><span styl=
e=3D"font-family:Consolas">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0hmac_key =3D hmac_=
obj.hexdigest()</span></span></div><div><span style=3D"font-family:Consolas=
"><span style=3D"font-size:10px"><span style=3D"font-stretch:normal;color:r=
gb(4,51,255)">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return</span><span style=3D"fon=
t-stretch:normal"> hmac_key</span></span></span></div></div><div><br></div>=
<div>The line that the error is thrown at is nameServer.register(name, uri)=
.=C2=A0 Please advise on what I am doing incorrectly.</div><div><br></div><=
div>Thanks,</div><div>Katelyn</div></div>

--001a113f9224d8123f0513648a90--


--===============7872088507132256753==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
--===============7872088507132256753==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Pyro-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyro-core

--===============7872088507132256753==--