OpenSSL/SOAP - keystore/truststore

I am attempting to connect to a secure SOAP web service and have been
provided a password protected keystore, truststore and also a self
signed *.cer file.

The server component is implemented in java and the documentation is
plentiful. While I have been able to use the non-secure service, I am
not sure how to use the keystore/truststore particularly with password
protection.

I realize that this is roughly what is available to me in the ruby lib:

wsdl = 'https://some.com/something.wsl'
factory = SOAP::WSDLDriverFactory.new( wsdl )
drv = factory.create_rpc_driver
drv.options[ 'protocol.http.ssl_config.ca_file' ] = nil

alternatively:

drv.options['protocol.http.ssl_config.verify_mode'] =
openSSL::SSL::VERIFY_NONE
#drv.options['protocol.http.ssl_config.verify_mode'] =
OpenSSL::SSL::VERIFY_PEER
drv.options['protocol.http.ssl_config.ca_file'] = 'api_cert_chain.crt'
drv.options['protocol.http.ssl_config.client_cert'] = 'client.cert'
drv.options['protocol.http.ssl_config.client_key'] = 'client.keys'

Thanks in advance for any insight.

Christopher Wilson

···

--
Posted via http://www.ruby-forum.com/.

I'd like to take a string like that below

"0011122234667889"

and reduce to

"012346789"

I can see ways to do it for a single digit, but
not all in one fell swoop:

"0011122234667889".gsub(/1{2,}/, "1") #reduce seq (2 or more) of 1s to single 1

"0011122234667889".gsub(/1+/, "1") #1 or more 1s to single 1

Thanks for any help.

Steve

My first try would be :

"0011122234667889".gsub /(\d)\1+/, '\1'

    -- Jean-François.

···

2008/3/6, Stephen Fickas <fickas@cs.uoregon.edu>:

I'd like to take a string like that below

"0011122234667889"

and reduce to

"012346789"

I can see ways to do it for a single digit, but
not all in one fell swoop:

"0011122234667889".gsub(/1{2,}/, "1")
#reduce seq (2 or more) of 1s to
single 1

"0011122234667889".gsub(/1+/, "1") #1 or more 1s to single 1

I'd like to take a string like that below

"0011122234667889"

and reduce to

"012346789"

How about this?

>> "0011122234667889".split("").uniq.join
=> "012346789"

James Edward Gray II

···

On Mar 6, 2008, at 1:01 PM, Stephen Fickas wrote:

> I'd like to take a string like that below

> "0011122234667889"

> and reduce to

> "012346789"

How about this?

>> "0011122234667889".split("").uniq.join
=> "012346789"

Not good.

irb(main):002:0> "0011122234667889".squeeze
=> "012346789"

···

On Mar 6, 1:13 pm, James Gray, Junior <ja...@grayproductions.net> wrote:

On Mar 6, 2008, at 1:01 PM, Stephen Fickas wrote:

James Gray, Junior

I love you too William.

James Edward Gray II

···

On Mar 6, 2008, at 4:39 PM, William James wrote:

On Mar 6, 1:13 pm, James Gray, Junior <ja...@grayproductions.net> > wrote:

On Mar 6, 2008, at 1:01 PM, Stephen Fickas wrote:

I'd like to take a string like that below

"0011122234667889"

and reduce to

"012346789"

How about this?

"0011122234667889".split("").uniq.join

=> "012346789"

Not good.

irb(main):002:0> "0011122234667889".squeeze
=> "012346789"

James Gray, Junior

Nice. I know, rtfm, right?

Steve

William James wrote:

···

On Mar 6, 1:13 pm, James Gray, Junior <ja...@grayproductions.net> > wrote:

On Mar 6, 2008, at 1:01 PM, Stephen Fickas wrote:

I'd like to take a string like that below
"0011122234667889"
and reduce to
"012346789"

How about this?

>> "0011122234667889".split("").uniq.join
=> "012346789"

Not good.

irb(main):002:0> "0011122234667889".squeeze
=> "012346789"

James Gray, Junior