Sample code for 30+ languages & platforms
Ruby

Transition from Crypt2.GetSignerCert to Crypt2.LastSignerCert

Provides instructions for replacing deprecated GetSignerCert method calls with LastSignerCert.

Chilkat Ruby Downloads

Ruby
require 'chilkat'

success = false

crypt2 = Chilkat::CkCrypt2.new()

# ...
# ...
index = 0

# ------------------------------------------------------------------------
# The GetSignerCert method is deprecated:

# certObj is a CkCert
certObj = crypt2.GetSignerCert(index)
if (crypt2.get_LastMethodSuccess() == false)
    print crypt2.lastErrorText() + "\n";
    exit
end

# ...
# ...

# ------------------------------------------------------------------------
# Do the equivalent using LastSignerCert.
# Your application creates a new, empty Cert object which is passed 
# in the last argument and filled upon success.

certOut = Chilkat::CkCert.new()
success = crypt2.LastSignerCert(index,certOut)
if (success == false)
    print crypt2.lastErrorText() + "\n";
    exit
end