Problem connecting to https using ZSI (openssl problem) - python2.3

Discussion in 'Python' started by Adil Hasan, Jan 28, 2004.

  1. Adil Hasan

    Adil Hasan Guest

    Hello,
    I'm having problems trying to use ZSI to connect to a https url.
    I give the command and I get prompted for my X509 cert pass-phrase, but
    the program dies with an openssl error.

    Here's my code:

    from ZSI import *
    u=''
    n='https://shahzad.fnal.gov/edg-voms-admin/uscms/services/VOMSAdmin'
    b = Binding(url=u,ns=n, ssl=1, \
    host='shahzad.fnal.gov',port=8080, \
    cert_file='/home/hasan/.globus/usercert.pem', \
    key_file='/home/hasan/.globus/userkey.pem')
    b.listCAs()

    The traceback I get is:
    Enter PEM pass phrase:
    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    File "/usr/local/python2.3/lib/python2.3/site-packages/ZSI/client.py",
    line 28, in __call__
    requesttypecode=TC.Any(self.name, aslist=1))
    File "/usr/local/python2.3/lib/python2.3/site-packages/ZSI/client.py",
    line 131, in RPC
    self.Send(url, opname, obj, **kw)
    File "/usr/local/python2.3/lib/python2.3/site-packages/ZSI/client.py",
    line 184, in Send
    self.h.connect()
    File "/usr/local/python2.3/lib/python2.3/httplib.py", line 961, in
    connect
    ssl = socket.ssl(sock, self.key_file, self.cert_file)
    File "/usr/local/python2.3/lib/python2.3/socket.py", line 73, in ssl
    return _realssl(sock, keyfile, certfile)
    socket.sslerror: (1, 'error:140770FC:SSL
    routines:SSL23_GET_SERVER_HELLO:unknown protocol')

    Any ideas about this? Does anyone know how to solve this problem? I have
    seen one post here with a similar problem, but haven't seen any
    resolution.

    Help!

    thanks, adil
     
    Adil Hasan, Jan 28, 2004
    #1
    1. Advertising

  2. Adil Hasan

    C GIllespie Guest

    Hi,

    Your best bet would be to ask this question in the python webservices
    mailing list (see link below)

    Colin

    http://sourceforge.net/mailarchive/forum.php?forum_id=1729



    "Adil Hasan" <> wrote in message
    news:p...
    >
    > Hello,
    > I'm having problems trying to use ZSI to connect to a https url.
    > I give the command and I get prompted for my X509 cert pass-phrase, but
    > the program dies with an openssl error.
    >
    > Here's my code:
    >
    > from ZSI import *
    > u=''
    > n='https://shahzad.fnal.gov/edg-voms-admin/uscms/services/VOMSAdmin'
    > b = Binding(url=u,ns=n, ssl=1, \
    > host='shahzad.fnal.gov',port=8080, \
    > cert_file='/home/hasan/.globus/usercert.pem', \
    > key_file='/home/hasan/.globus/userkey.pem')
    > b.listCAs()
    >
    > The traceback I get is:
    > Enter PEM pass phrase:
    > Traceback (most recent call last):
    > File "<stdin>", line 1, in ?
    > File "/usr/local/python2.3/lib/python2.3/site-packages/ZSI/client.py",
    > line 28, in __call__
    > requesttypecode=TC.Any(self.name, aslist=1))
    > File "/usr/local/python2.3/lib/python2.3/site-packages/ZSI/client.py",
    > line 131, in RPC
    > self.Send(url, opname, obj, **kw)
    > File "/usr/local/python2.3/lib/python2.3/site-packages/ZSI/client.py",
    > line 184, in Send
    > self.h.connect()
    > File "/usr/local/python2.3/lib/python2.3/httplib.py", line 961, in
    > connect
    > ssl = socket.ssl(sock, self.key_file, self.cert_file)
    > File "/usr/local/python2.3/lib/python2.3/socket.py", line 73, in ssl
    > return _realssl(sock, keyfile, certfile)
    > socket.sslerror: (1, 'error:140770FC:SSL
    > routines:SSL23_GET_SERVER_HELLO:unknown protocol')
    >
    > Any ideas about this? Does anyone know how to solve this problem? I have
    > seen one post here with a similar problem, but haven't seen any
    > resolution.
    >
    > Help!
    >
    > thanks, adil
     
    C GIllespie, Jan 28, 2004
    #2
    1. Advertising

  3. Adil Hasan

    Adil Hasan Guest

    Re: Problem connecting to https using ZSI (openssl problem) -python2.3

    Hello,
    As a follow up to this. I noticed that the port that I was
    contacting the server on was not correct. Now, I have moved forward
    to an access denied message (I'll post that error in another news group).

    Hope this is helpful, adil


    On Tue, 27 Jan 2004, Adil Hasan wrote:

    >
    > Hello,
    > I'm having problems trying to use ZSI to connect to a https url.
    > I give the command and I get prompted for my X509 cert pass-phrase, but
    > the program dies with an openssl error.
    >
    > Here's my code:
    >
    > from ZSI import *
    > u=''
    > n='https://shahzad.fnal.gov/edg-voms-admin/uscms/services/VOMSAdmin'
    > b = Binding(url=u,ns=n, ssl=1, \
    > host='shahzad.fnal.gov',port=8080, \
    > cert_file='/home/hasan/.globus/usercert.pem', \
    > key_file='/home/hasan/.globus/userkey.pem')
    > b.listCAs()
    >
    > The traceback I get is:
    > Enter PEM pass phrase:
    > Traceback (most recent call last):
    > File "<stdin>", line 1, in ?
    > File "/usr/local/python2.3/lib/python2.3/site-packages/ZSI/client.py",
    > line 28, in __call__
    > requesttypecode=TC.Any(self.name, aslist=1))
    > File "/usr/local/python2.3/lib/python2.3/site-packages/ZSI/client.py",
    > line 131, in RPC
    > self.Send(url, opname, obj, **kw)
    > File "/usr/local/python2.3/lib/python2.3/site-packages/ZSI/client.py",
    > line 184, in Send
    > self.h.connect()
    > File "/usr/local/python2.3/lib/python2.3/httplib.py", line 961, in
    > connect
    > ssl = socket.ssl(sock, self.key_file, self.cert_file)
    > File "/usr/local/python2.3/lib/python2.3/socket.py", line 73, in ssl
    > return _realssl(sock, keyfile, certfile)
    > socket.sslerror: (1, 'error:140770FC:SSL
    > routines:SSL23_GET_SERVER_HELLO:unknown protocol')
    >
    > Any ideas about this? Does anyone know how to solve this problem? I have
    > seen one post here with a similar problem, but haven't seen any
    > resolution.
    >
    > Help!
    >
    > thanks, adil
    >
     
    Adil Hasan, Jan 28, 2004
    #3
  4. Adil Hasan

    John J. Lee Guest

    Adil Hasan <> writes:

    > Hello,
    > As a follow up to this. I noticed that the port that I was
    > contacting the server on was not correct. Now, I have moved forward
    > to an access denied message (I'll post that error in another news group).

    [...]

    You might have better luck using axis from Jython. ZSI seems to be
    fairly buggy (maybe that's not altogether fair: the protocols are
    apparently still a bit dodgy too, so the fault could be partly be on
    that end). I had some success with axis and SOAP/WSDL.


    John
     
    John J. Lee, Jan 29, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Xavier
    Replies:
    0
    Views:
    421
    Xavier
    Aug 6, 2003
  2. Skip Montanaro
    Replies:
    1
    Views:
    436
    Thomas Heller
    Aug 7, 2003
  3. Ksenia Marasanova
    Replies:
    2
    Views:
    356
    Mike Meyer
    Nov 17, 2005
  4. Xiao Jianfeng
    Replies:
    1
    Views:
    382
    Mike Meyer
    Nov 18, 2005
  5. Redd Vinylene
    Replies:
    6
    Views:
    306
    Jakub Pawlowicz
    Nov 18, 2008
Loading...

Share This Page