Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

TrustVerify (obsolete) – PB Docs 2019 – PowerBuilder Library

TrustVerify (obsolete) – PB Docs 2019

TrustVerify (obsolete)

Description

Called by EAServer when an SSL certificate chain needs to be
approved for use by a client. This function is used by PowerBuilder
clients connecting to EAServer.

Obsolete function

TrustVerify is obsolete, because EAServer is no longer supported
since PowerBuilder 2017.

Applies to

SSLCallBack objects

Syntax

Argument

Description

sslcallback

An instance of a customized SSLCallBack object

thesessioninfo

A CORBAObject that contains information about the SSL
session

reason

A long value indicating the reason for the call back.
Values are:

  • 1 REASON_CHAIN_INCOMPLETE

  • 2 REASON_UNKNOWN_CA

  • 3 REASON_CHAIN_EXPIRED

  • 4 REASON_TRUSTDBPINNOTSET

  • 5 REASON_TRUSTDBLOGINFAILED

Return value

Long.

Returns one of the following values:

1 — TRUST_ONCE (accept the current connection)

2 — TRUST_FAIL (reject the current connection)

3 — TRUST_ALWAYS (accept and mark as trusted in the
database)

4 — TRUST_NEVER (reject and mark as untrusted in the
database)

5 — TRUST_SESSION (accept now and throughout the current
session)

6 — TRUST_FAIL_SESSION (reject throughout the current
session)

Usage

A PowerBuilder application does not usually call the TrustVerify
function directly. TrustVerify is called by EAServer when the internal SSL
trust verification check fails to verify the server’s certificate chain or
when the PIN to log in to the Sybase PKCS11 token was not supplied or
incorrect. TrustVerify can be invoked when you are using any SSL protocol,
because server authentication is a required step in the SSL handshake
process.

To override the behavior of any of the functions of the SSLCallBack
object, create a standard class user object that descends from SSLCallBack
and customize this object as necessary. To let EAServer know which object
to use when a callback is required, specify the name of the object in the
callbackImpl SSL property. You can set this property value by calling the
SetGlobalProperty function.

If you do not provide an implementation of TrustVerify, EAServer
receives the CORBA::NO_IMPLEMENT exception and the connection is
rejected.

To obtain a useful return value, provide the user with information
about the reason for failure and ask the user to determine whether the
server certificate chain can be trusted so that the session can continue.
If the user specifies TRUST_FAIL or TRUST_ONCE, the function may be called
again during the current session.

You can enable the user to cancel the attempt to connect by throwing
an exception in this callback function. You need to catch the exception by
wrapping the ConnectToServer function in a try-catch block.

Examples

This example checks whether the failure was called by a bad or
missing PIN and returns TRUST_FAIL to call GetPin if it was. If not, it
displays the reason why the server failed to verify the certificate chain
and prompts the user to choose whether to continue with the
session:

See also

ConnectToServer
(obsolete)

GetCertificateLabel
(obsolete)

GetCredentialAttribute
(obsolete)

GetPin (obsolete)


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x