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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Adil Hasan

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


    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.go v/edg-voms-admin/uscms/services/VOMSAdmin'
    b = Binding(url=u,n s=n, ssl=1, \
    host='shahzad.f nal.gov',port=8 080, \
    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.na me, 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_HELL O: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

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

    Hi,

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

    Colin





    "Adil Hasan" <hasan@slac.sta nford.edu> wrote in message
    news:Pine.GSO.4 .58.04012719081 90.25634@flora0 1.slac.stanford .edu...[color=blue]
    >
    > 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.go v/edg-voms-admin/uscms/services/VOMSAdmin'
    > b = Binding(url=u,n s=n, ssl=1, \
    > host='shahzad.f nal.gov',port=8 080, \
    > 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.na me, 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_HELL O: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[/color]


    Comment

    • Adil Hasan

      #3
      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:
      [color=blue]
      >
      > 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.go v/edg-voms-admin/uscms/services/VOMSAdmin'
      > b = Binding(url=u,n s=n, ssl=1, \
      > host='shahzad.f nal.gov',port=8 080, \
      > 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.na me, 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_HELL O: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
      >[/color]

      Comment

      • John J. Lee

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

        Adil Hasan <hasan@slac.sta nford.edu> writes:
        [color=blue]
        > 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).[/color]
        [...]

        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

        Comment

        Working...