IP*Works! SSL V6

ipworksssl
Class Ldaps

java.lang.Object
  |
  +--ipworksssl.Ldaps

public class Ldaps
extends java.lang.Object

The LDAPS bean is used to communicate with LDAP Directory Servers using the LDAP (Lightweight Directory Access) protocol.

The LDAPS bean is the SSL-enabled equivalent of the IP*Works! LDAP bean. The main difference is the introduction of a set of new configuration settings, properties and events that deal with SSL security. TheSSLProviderconfiguration setting chooses a security provider subsystem. TheSSLEnabledProtocolsandSSLCipherStrengthconfiguration settings determine which protocols are enabled and at what security level. The SSLCertStore , SSLCertSubject , and SSLCertEncoded properties are used to select a client certificate if the server is requesting client authentication. TheSSLSecurityFlagsconfiguration setting, together with the SSLServerAuthentication event allow you to check the server identity and other security attributes. Finally, the SSLStatus event provides information about the SSL handshake.

The LDAPS bean implements a standard LDAP client as specified in RFC 1777, 2251, and other LDAP RFCs. Support for both LDAP v2 and v3 is provided.

The first step in using the bean is specifying the ServerName , a DN (Distinguished Name) to bind as, and optionally a Password . Then you can call one or more of the bean methods to act upon the server. Server responses are normally received through the Result event. The only exception are search requests which result in one or more SearchResult events, followed by a final SearchComplete event.

Attributes are set and returned through attribute arrays such as AttrType and AttrValue . Other command arguments are specified through other properties. These are specified in detail in each method.

Search filters are to be specified as string arguments to the Search method. The format must be a standard LDAP search string as specified in RFC 1558. Other search attributes are set in properties such as SearchScope , SearchTimeLimit , SearchSizeLimit , SearchReturnValues , and SearchDerefAliases .

The bean operates synchronously by default (waits for a response before returning control to the caller), however, the bean may also operate asynchronously (return control immediately), by setting Timeout to 0. Please refer to the Timeout property for more information.


Field Summary
static int amoAdd
           
static int amoDelete
           
static int amoReplace
           
static int fwNone
           
static int fwSOCKS4
           
static int fwSOCKS5
           
static int fwTunnel
           
static int sdaAlways
           
static int sdaFindingBaseObject
           
static int sdaInSearching
           
static int sdaNever
           
static int ssBaseObject
           
static int sslAutomatic
           
static int sslExplicit
           
static int sslImplicit
           
static int sslNone
           
static int ssSingleLevel
           
static int sstMachine
           
static int sstPEMKey
           
static int sstPFXBlob
           
static int sstPFXFile
           
static int sstUser
           
static int ssWholeSubtree
           
 
Constructor Summary
Ldaps()
           
 
Method Summary
 void abandon(int messageId)
          Ask the server to abandon a request.
 void add()
          Add an entry specified by DN to the directory server using the attributes defined in AttrType and AttrValue .
 void addLdapsEventListener(LdapsEventListener l)
           
 void bind()
          Connect and bind to the directory server.
 void compare()
          Compare attributes and values with those of the entry specified by DN .
 java.lang.String config(java.lang.String configurationString)
          Sets or retrieves a beanconfiguration setting.
 void delete()
          Delete an entry specified by DN from the directory server.
 void doEvents()
          Processes events from the internal message queue.
 void extendedRequest(java.lang.String requestName, byte[] requestValue)
          Perform an LDAP V3 Extended Operation.
 int getAttrCount()
          Number of attributes values for the current entry.
 int getAttrModOp(int attrIndex)
          Array of operations to apply on attributes during an LDAP modify operation.
 java.lang.String getAttrType(int attrIndex)
          Array of attribute types for the current entry.
 byte[] getAttrValue(int attrIndex)
          Array of attribute values for the current entry.
 java.lang.String getDN()
          The Distinguished Name used as the base for LDAP operations.
 java.lang.String getFirewallHost()
          Name or IP address of firewall (optional).
 java.lang.String getFirewallPassword()
          A password if authentication is to be used when connecting through the firewall.
 int getFirewallPort()
          Port of the firewall to connect to.
 int getFirewallType()
          Determines the type of firewall to connect through.
 java.lang.String getFirewallUser()
          A user name if authentication is to be used connecting through a firewall.
 int getLDAPVersion()
          The version of LDAP used.
 java.lang.String getLocalHost()
          The name of the local host or user-assigned IP interface through which connections are initiated or accepted.
 int getMessageId()
          The message id for the next LDAP request.
 int getPageSize()
          The maximum number of results per page for the Search method.
 java.lang.String getPassword()
          The password used to authenticate to the LDAP server.
 int getResultCode()
          The result code returned in the last server response.
 java.lang.String getResultDescription()
          The descriptive text returned in the last server response (if any).
 java.lang.String getResultDN()
          The Distinguished Name returned in the last server response (if any).
 int getSearchDerefAliases()
          Controls alias dereferencing during searching.
 int getSearchScope()
          Controls the scope of LDAP search operations.
 int getSearchSizeLimit()
          Maximum number of entries that can be returned by the next search operation.
 int getSearchTimeLimit()
          A time limit for the next search operation (in seconds).
 java.lang.String getServerName()
          The name or address of the LDAP server.
 int getServerPort()
          The server port for LDAP (default 389).
 java.lang.String getSortAttributes()
          A string of attribute names to sort on with optional relative matching rules.
 byte[] getSSLAcceptServerCert()
          Instructs the bean to unconditionally accept the server certificate that matches the supplied certificate.
 byte[] getSSLCertEncoded()
          The SSL certificate (PEM/base64 encoded).
 byte[] getSSLCertStore()
          The name of the certificate store for the client certificate.
 java.lang.String getSSLCertStorePassword()
          The password for the certificate store (if any).
 int getSSLCertStoreType()
          The type of certificate store for the client certificate.
 java.lang.String getSSLCertSubject()
          The subject of the certificate used for client authentication.
 byte[] getSSLServerCert()
          The server certificate for the last established connection.
 java.lang.String getSSLServerCertStatus()
          The verification status of the server certificate for the last established connection.
 int getSSLStartMode()
          Determines how the bean starts the SSL negotiation.
 int getTimeout()
          A timeout for the bean.
 void interrupt()
          Interrupt the current method.
 boolean isAcceptData()
          Enables or disables data reception from the server.
 boolean isConnected()
          Shows whether the bean is connected.
 boolean isDeleteOldRDN()
          Controls whether the old RDN (Relative Distinguished Name) should be deleted.
 boolean isIdle()
          The current status of the component.
 boolean isSearchReturnValues()
          Controls whether the search operation returns values of attributes, or only types.
 void modify()
          Perform an LDAP 'modify' operation on the entry specified by DN .
 void modifyRDN(java.lang.String newRDN)
          Perform an LDAP 'modify RDN' operation an entry specified by DN .
 void removeLdapsEventListener(LdapsEventListener l)
           
 void search(java.lang.String searchFilter)
          Search the directory server using the base object specified in DN and the search filter SearchFilter .
 void setAcceptData(boolean acceptData)
          Enables or disables data reception from the server.
 void setAttrCount(int attrCount)
          Number of attributes values for the current entry.
 void setAttrModOp(int attrIndex, int attrModOp)
          Array of operations to apply on attributes during an LDAP modify operation.
 void setAttrType(int attrIndex, java.lang.String attrType)
          Array of attribute types for the current entry.
 void setAttrValue(int attrIndex, byte[] attrValue)
          Array of attribute values for the current entry.
 void setConnected(boolean connected)
          Shows whether the bean is connected.
 void setDeleteOldRDN(boolean deleteOldRDN)
          Controls whether the old RDN (Relative Distinguished Name) should be deleted.
 void setDN(java.lang.String DN)
          The Distinguished Name used as the base for LDAP operations.
 void setFirewallHost(java.lang.String firewallHost)
          Name or IP address of firewall (optional).
 void setFirewallPassword(java.lang.String firewallPassword)
          A password if authentication is to be used when connecting through the firewall.
 void setFirewallPort(int firewallPort)
          Port of the firewall to connect to.
 void setFirewallType(int firewallType)
          Determines the type of firewall to connect through.
 void setFirewallUser(java.lang.String firewallUser)
          A user name if authentication is to be used connecting through a firewall.
 void setLDAPVersion(int LDAPVersion)
          The version of LDAP used.
 void setLocalHost(java.lang.String localHost)
          The name of the local host or user-assigned IP interface through which connections are initiated or accepted.
 void setMessageId(int messageId)
          The message id for the next LDAP request.
 void setPageSize(int pageSize)
          The maximum number of results per page for the Search method.
 void setPassword(java.lang.String password)
          The password used to authenticate to the LDAP server.
 void setSearchDerefAliases(int searchDerefAliases)
          Controls alias dereferencing during searching.
 void setSearchReturnValues(boolean searchReturnValues)
          Controls whether the search operation returns values of attributes, or only types.
 void setSearchScope(int searchScope)
          Controls the scope of LDAP search operations.
 void setSearchSizeLimit(int searchSizeLimit)
          Maximum number of entries that can be returned by the next search operation.
 void setSearchTimeLimit(int searchTimeLimit)
          A time limit for the next search operation (in seconds).
 void setServerName(java.lang.String serverName)
          The name or address of the LDAP server.
 void setServerPort(int serverPort)
          The server port for LDAP (default 389).
 void setSortAttributes(java.lang.String sortAttributes)
          A string of attribute names to sort on with optional relative matching rules.
 void setSSLAcceptServerCert(byte[] SSLAcceptServerCert)
          Instructs the bean to unconditionally accept the server certificate that matches the supplied certificate.
 void setSSLCertEncoded(byte[] SSLCertEncoded)
          The SSL certificate (PEM/base64 encoded).
 void setSSLCertStore(byte[] SSLCertStore)
          The name of the certificate store for the client certificate.
 void setSSLCertStorePassword(java.lang.String SSLCertStorePassword)
          The password for the certificate store (if any).
 void setSSLCertStoreType(int SSLCertStoreType)
          The type of certificate store for the client certificate.
 void setSSLCertSubject(java.lang.String SSLCertSubject)
          The subject of the certificate used for client authentication.
 void setSSLStartMode(int SSLStartMode)
          Determines how the bean starts the SSL negotiation.
 void setTimeout(int timeout)
          A timeout for the bean.
 void unbind()
          Unbind from the directory server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

amoAdd

public static final int amoAdd
See Also:
Constant Field Values

amoDelete

public static final int amoDelete
See Also:
Constant Field Values

amoReplace

public static final int amoReplace
See Also:
Constant Field Values

fwNone

public static final int fwNone
See Also:
Constant Field Values

fwTunnel

public static final int fwTunnel
See Also:
Constant Field Values

fwSOCKS4

public static final int fwSOCKS4
See Also:
Constant Field Values

fwSOCKS5

public static final int fwSOCKS5
See Also:
Constant Field Values

sdaNever

public static final int sdaNever
See Also:
Constant Field Values

sdaInSearching

public static final int sdaInSearching
See Also:
Constant Field Values

sdaFindingBaseObject

public static final int sdaFindingBaseObject
See Also:
Constant Field Values

sdaAlways

public static final int sdaAlways
See Also:
Constant Field Values

ssBaseObject

public static final int ssBaseObject
See Also:
Constant Field Values

ssSingleLevel

public static final int ssSingleLevel
See Also:
Constant Field Values

ssWholeSubtree

public static final int ssWholeSubtree
See Also:
Constant Field Values

sstUser

public static final int sstUser
See Also:
Constant Field Values

sstMachine

public static final int sstMachine
See Also:
Constant Field Values

sstPFXFile

public static final int sstPFXFile
See Also:
Constant Field Values

sstPFXBlob

public static final int sstPFXBlob
See Also:
Constant Field Values

sstPEMKey

public static final int sstPEMKey
See Also:
Constant Field Values

sslAutomatic

public static final int sslAutomatic
See Also:
Constant Field Values

sslImplicit

public static final int sslImplicit
See Also:
Constant Field Values

sslExplicit

public static final int sslExplicit
See Also:
Constant Field Values

sslNone

public static final int sslNone
See Also:
Constant Field Values
Constructor Detail

Ldaps

public Ldaps()
Method Detail

isAcceptData

public boolean isAcceptData()
Enables or disables data reception from the server.

Setting the property to False, temporarily disables data reception. Setting the property to True, reenables data reception.


setAcceptData

public void setAcceptData(boolean acceptData)
                   throws IPWorksSSLException
Enables or disables data reception from the server.

Setting the property to False, temporarily disables data reception. Setting the property to True, reenables data reception.

IPWorksSSLException

getAttrCount

public int getAttrCount()
Number of attributes values for the current entry.

Setting AttrCount to 0 clears the AttrType and AttrValue arrays.


setAttrCount

public void setAttrCount(int attrCount)
                  throws IPWorksSSLException
Number of attributes values for the current entry.

Setting AttrCount to 0 clears the AttrType and AttrValue arrays.

IPWorksSSLException

getAttrModOp

public int getAttrModOp(int attrIndex)
                 throws IPWorksSSLException
Array of operations to apply on attributes during an LDAP modify operation.

Possible values include:

amoAdd (0)
Add attribute.
amoDelete (1)
Delete attribute.
amoReplace (2)
Replace attribute.
The indexes start at 0 and end at AttrCount - 1.

IPWorksSSLException

setAttrModOp

public void setAttrModOp(int attrIndex,
                         int attrModOp)
                  throws IPWorksSSLException
Array of operations to apply on attributes during an LDAP modify operation.

Possible values include:

amoAdd (0)
Add attribute.
amoDelete (1)
Delete attribute.
amoReplace (2)
Replace attribute.
The indexes start at 0 and end at AttrCount - 1.

IPWorksSSLException

getAttrType

public java.lang.String getAttrType(int attrIndex)
                             throws IPWorksSSLException
Array of attribute types for the current entry.

If the value of AttrType for a particular array index is an empty string, then the corresponding value is part of a set of values, and the attribute type for the set is specified in the nearest AttrType with a lower index that has a value other than an empty string.

The number of valid members in the array is specified by AttrCount .

The indexes start at 0 and end at AttrCount - 1.

IPWorksSSLException

setAttrType

public void setAttrType(int attrIndex,
                        java.lang.String attrType)
                 throws IPWorksSSLException
Array of attribute types for the current entry.

If the value of AttrType for a particular array index is an empty string, then the corresponding value is part of a set of values, and the attribute type for the set is specified in the nearest AttrType with a lower index that has a value other than an empty string.

The number of valid members in the array is specified by AttrCount .

The indexes start at 0 and end at AttrCount - 1.

IPWorksSSLException

getAttrValue

public byte[] getAttrValue(int attrIndex)
                    throws IPWorksSSLException
Array of attribute values for the current entry.

If the value is part of a set of values, the corresponding AttrType is an empty string, and the attribute type for the set is specified in the nearest AttrType with a lower index that has a value other than an empty string.

The number of valid members in the array is specified by AttrCount .

The indexes start at 0 and end at AttrCount - 1.

IPWorksSSLException

setAttrValue

public void setAttrValue(int attrIndex,
                         byte[] attrValue)
                  throws IPWorksSSLException
Array of attribute values for the current entry.

If the value is part of a set of values, the corresponding AttrType is an empty string, and the attribute type for the set is specified in the nearest AttrType with a lower index that has a value other than an empty string.

The number of valid members in the array is specified by AttrCount .

The indexes start at 0 and end at AttrCount - 1.

IPWorksSSLException

isConnected

public boolean isConnected()
Shows whether the bean is connected.

Use this property to determine whether the bean is connected to the remote host or not.


setConnected

public void setConnected(boolean connected)
                  throws IPWorksSSLException
Shows whether the bean is connected.

Use this property to determine whether the bean is connected to the remote host or not.

IPWorksSSLException

isDeleteOldRDN

public boolean isDeleteOldRDN()
Controls whether the old RDN (Relative Distinguished Name) should be deleted.

Used when ModifyRDN is called. The default value is True, which instructs the server to delete the old RDN.


setDeleteOldRDN

public void setDeleteOldRDN(boolean deleteOldRDN)
                     throws IPWorksSSLException
Controls whether the old RDN (Relative Distinguished Name) should be deleted.

Used when ModifyRDN is called. The default value is True, which instructs the server to delete the old RDN.

IPWorksSSLException

getDN

public java.lang.String getDN()
The Distinguished Name used as the base for LDAP operations.

Also the base object during LDAP searches.

The Distinguished Name is provided in string format as specified by RFC 1779. Example (Setting DN)

 LDAPControl.DN = "uid=TThompson,ou=Employees,dc=server"
 
 LDAPControl.DN = "Domain/Username" 


setDN

public void setDN(java.lang.String DN)
           throws IPWorksSSLException
The Distinguished Name used as the base for LDAP operations.

Also the base object during LDAP searches.

The Distinguished Name is provided in string format as specified by RFC 1779. Example (Setting DN)

 LDAPControl.DN = "uid=TThompson,ou=Employees,dc=server"
 
 LDAPControl.DN = "Domain/Username" 

IPWorksSSLException

getFirewallHost

public java.lang.String getFirewallHost()
Name or IP address of firewall (optional).

If a FirewallHost is given, requested connections will be authenticated through the specified firewall when connecting.

If the FirewallHost property is set to a Domain Name, a DNS request is initiated. Upon successful termination of the request, the FirewallHost property is set to the corresponding address. If the search is not successful, an error is returned.


setFirewallHost

public void setFirewallHost(java.lang.String firewallHost)
                     throws IPWorksSSLException
Name or IP address of firewall (optional).

If a FirewallHost is given, requested connections will be authenticated through the specified firewall when connecting.

If the FirewallHost property is set to a Domain Name, a DNS request is initiated. Upon successful termination of the request, the FirewallHost property is set to the corresponding address. If the search is not successful, an error is returned.

IPWorksSSLException

getFirewallPassword

public java.lang.String getFirewallPassword()
A password if authentication is to be used when connecting through the firewall.

if FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to connect and authenticate to the given firewall. If the authentication fails, a trappable error is fired.


setFirewallPassword

public void setFirewallPassword(java.lang.String firewallPassword)
                         throws IPWorksSSLException
A password if authentication is to be used when connecting through the firewall.

if FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to connect and authenticate to the given firewall. If the authentication fails, a trappable error is fired.

IPWorksSSLException

getFirewallPort

public int getFirewallPort()
Port of the firewall to connect to.

The TCP port for the FirewallHost . See the description of the FirewallHost property for details.

Note that the FirewallPort is set automatically when FirewallType is set to a valid value. See the description of the FirewallType property for details.


setFirewallPort

public void setFirewallPort(int firewallPort)
                     throws IPWorksSSLException
Port of the firewall to connect to.

The TCP port for the FirewallHost . See the description of the FirewallHost property for details.

Note that the FirewallPort is set automatically when FirewallType is set to a valid value. See the description of the FirewallType property for details.

IPWorksSSLException

getFirewallType

public int getFirewallType()
Determines the type of firewall to connect through.

The applicable values are the following:

fwNone (0)
No firewall (default setting).
fwTunnel (1)
Connect through a tunneling proxy. FirewallPort is set to 80.
fwSOCKS4 (2)
Connect through a SOCKS4 Proxy. FirewallPort is set to 1080.
fwSOCKS5 (3)
Connect through a SOCKS5 Proxy. FirewallPort is set to 1080.


setFirewallType

public void setFirewallType(int firewallType)
                     throws IPWorksSSLException
Determines the type of firewall to connect through.

The applicable values are the following:

fwNone (0)
No firewall (default setting).
fwTunnel (1)
Connect through a tunneling proxy. FirewallPort is set to 80.
fwSOCKS4 (2)
Connect through a SOCKS4 Proxy. FirewallPort is set to 1080.
fwSOCKS5 (3)
Connect through a SOCKS5 Proxy. FirewallPort is set to 1080.

IPWorksSSLException

getFirewallUser

public java.lang.String getFirewallUser()
A user name if authentication is to be used connecting through a firewall.

if FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to connect and authenticate to the given firewall. If the authentication fails, a trappable error is fired.


setFirewallUser

public void setFirewallUser(java.lang.String firewallUser)
                     throws IPWorksSSLException
A user name if authentication is to be used connecting through a firewall.

if FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to connect and authenticate to the given firewall. If the authentication fails, a trappable error is fired.

IPWorksSSLException

isIdle

public boolean isIdle()
The current status of the component.

Idle will be False if the component is currently busy (communicating and/or waiting for an answer), and True at all other times.


getLDAPVersion

public int getLDAPVersion()
The version of LDAP used.

The default value is 2 (for LDAPv2).


setLDAPVersion

public void setLDAPVersion(int LDAPVersion)
                    throws IPWorksSSLException
The version of LDAP used.

The default value is 2 (for LDAPv2).

IPWorksSSLException

getLocalHost

public java.lang.String getLocalHost()
The name of the local host or user-assigned IP interface through which connections are initiated or accepted.

The LocalHost property contains the name of the local host as obtained by the gethostname() system call, or if the user has assigned an IP address, the value of that address.

In multihomed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the bean initiate connections (or accept in the case of server beans) only through that interface.

If the bean is connected, the LocalHost property shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multihomed hosts (machines with more than one IP interface).

NOTE: LocalHost is not persistent. You must always set it in code, and never in the property window.


setLocalHost

public void setLocalHost(java.lang.String localHost)
                  throws IPWorksSSLException
The name of the local host or user-assigned IP interface through which connections are initiated or accepted.

The LocalHost property contains the name of the local host as obtained by the gethostname() system call, or if the user has assigned an IP address, the value of that address.

In multihomed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the bean initiate connections (or accept in the case of server beans) only through that interface.

If the bean is connected, the LocalHost property shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multihomed hosts (machines with more than one IP interface).

NOTE: LocalHost is not persistent. You must always set it in code, and never in the property window.

IPWorksSSLException

getMessageId

public int getMessageId()
The message id for the next LDAP request.

If a custom value is needed for MessageId , the property must be set before calling any other methods. The bean increments MessageId automatically after each request.


setMessageId

public void setMessageId(int messageId)
                  throws IPWorksSSLException
The message id for the next LDAP request.

If a custom value is needed for MessageId , the property must be set before calling any other methods. The bean increments MessageId automatically after each request.

IPWorksSSLException

getPageSize

public int getPageSize()
The maximum number of results per page for the Search method.

The default value is 0 (no paging). If set to a value greater than zero, results will be paged, i.e. returned in blocks of maximum PageSize results.

For each page sent by the server, a SearchPage event will fire. you may decide to cancel or continue displaying results from within this event.

Note: LDAP paging functionality is described by LDAP extension RFCs and may or may not be implemented by the LDAP server being accessed.


setPageSize

public void setPageSize(int pageSize)
                 throws IPWorksSSLException
The maximum number of results per page for the Search method.

The default value is 0 (no paging). If set to a value greater than zero, results will be paged, i.e. returned in blocks of maximum PageSize results.

For each page sent by the server, a SearchPage event will fire. you may decide to cancel or continue displaying results from within this event.

Note: LDAP paging functionality is described by LDAP extension RFCs and may or may not be implemented by the LDAP server being accessed.

IPWorksSSLException

getPassword

public java.lang.String getPassword()
The password used to authenticate to the LDAP server.

Leave this value empty if no password is required.


setPassword

public void setPassword(java.lang.String password)
                 throws IPWorksSSLException
The password used to authenticate to the LDAP server.

Leave this value empty if no password is required.

IPWorksSSLException

getResultCode

public int getResultCode()
The result code returned in the last server response.

This is identical to the corresponding parameter provided by the last Result or SearchComplete event.

Possible result codes are:

0
success
1
operationsError
2
protocolError
3
timeLimitExceeded
4
sizeLimitExceeded
5
compareFalse
6
compareTrue
7
authMethodNotSupported
8
strongAuthRequired
9
reserved
10
referral
11
adminLimitExceeded
12
unavailableCriticalExtension
13
confidentialityRequired
14
saslBindInProgress
16
noSuchAttribute
17
undefinedAttributeType
18
inappropriateMatching
19
constraintViolation
20
attributeOrValueExists
21
invalidAttributeSyntax
32
noSuchObject
33
aliasProblem
34
invalidDNSyntax
35
reserved for undefined isLeaf
36
aliasDereferencingProblem
48
inappropriateAuthentication
49
invalidCredentials
50
insufficientAccessRights
51
busy
52
unavailable
53
unwillingToPerform
54
loopDetect
64
namingViolation
65
objectClassViolation
66
notAllowedOnNonLeaf
67
notAllowedOnRDN
68
entryAlreadyExists
69
objectClassModsProhibited
70
reserved for CLDAP
71
affectsMultipleDSAs

All the result codes with the exception of success, compareFalse and compareTrue are to be treated as meaning the operation could not be completed in its entirety. Result codes from 16 to 21 indicate an AttributeProblem, codes 32, 33, 34 and 36 indicate a NameProblem, codes 48, 49 and 50 indicate a SecurityProblem, codes 51 to 54 indicate a ServiceProblem, and codes 64 to 69 and 71 indicate an UpdateProblem.


getResultDescription

public java.lang.String getResultDescription()
The descriptive text returned in the last server response (if any).

This is identical to the corresponding parameter provided by the last Result or SearchComplete event.


getResultDN

public java.lang.String getResultDN()
The Distinguished Name returned in the last server response (if any).

This is identical to the corresponding parameter provided by the last Result or SearchComplete event.


getSearchDerefAliases

public int getSearchDerefAliases()
Controls alias dereferencing during searching.

Possible values are:

sdaNever (0)
Do not dereference aliases in searching or in locating the base object of the search.
sdaInSearching (1)
Dereference aliases in subordinates of the base object in searching, but not in locating the base object of the search.
sdaFindingBaseObject (2)
Dereference aliases in locating the base object of the search, but not when searching subordinates of the base object.
sdaAlways (3)
Dereference aliases both in searching and in locating the base object of the search.

Default is to never dereference aliases.


setSearchDerefAliases

public void setSearchDerefAliases(int searchDerefAliases)
                           throws IPWorksSSLException
Controls alias dereferencing during searching.

Possible values are:

sdaNever (0)
Do not dereference aliases in searching or in locating the base object of the search.
sdaInSearching (1)
Dereference aliases in subordinates of the base object in searching, but not in locating the base object of the search.
sdaFindingBaseObject (2)
Dereference aliases in locating the base object of the search, but not when searching subordinates of the base object.
sdaAlways (3)
Dereference aliases both in searching and in locating the base object of the search.

Default is to never dereference aliases.

IPWorksSSLException

isSearchReturnValues

public boolean isSearchReturnValues()
Controls whether the search operation returns values of attributes, or only types.

If only attributes are needed, disabling returning of values will enhance performance.


setSearchReturnValues

public void setSearchReturnValues(boolean searchReturnValues)
                           throws IPWorksSSLException
Controls whether the search operation returns values of attributes, or only types.

If only attributes are needed, disabling returning of values will enhance performance.

IPWorksSSLException

getSearchScope

public int getSearchScope()
Controls the scope of LDAP search operations.

Possible values are:

ssBaseObject (0)
Search only the base object.
ssSingleLevel (1)
Search only one level.
ssWholeSubtree (2)
Search the whole subtree.

Default is to search the whole subtree.


setSearchScope

public void setSearchScope(int searchScope)
                    throws IPWorksSSLException
Controls the scope of LDAP search operations.

Possible values are:

ssBaseObject (0)
Search only the base object.
ssSingleLevel (1)
Search only one level.
ssWholeSubtree (2)
Search the whole subtree.

Default is to search the whole subtree.

IPWorksSSLException

getSearchSizeLimit

public int getSearchSizeLimit()
Maximum number of entries that can be returned by the next search operation.

This limit is provided as a hint to the directory server. A value of 0 means that no size limits are in effect for the search.


setSearchSizeLimit

public void setSearchSizeLimit(int searchSizeLimit)
                        throws IPWorksSSLException
Maximum number of entries that can be returned by the next search operation.

This limit is provided as a hint to the directory server. A value of 0 means that no size limits are in effect for the search.

IPWorksSSLException

getSearchTimeLimit

public int getSearchTimeLimit()
A time limit for the next search operation (in seconds).

This limit is provided as a hint to the directory server. A value of 0 means that no time limits are in effect for the search.


setSearchTimeLimit

public void setSearchTimeLimit(int searchTimeLimit)
                        throws IPWorksSSLException
A time limit for the next search operation (in seconds).

This limit is provided as a hint to the directory server. A value of 0 means that no time limits are in effect for the search.

IPWorksSSLException

getServerName

public java.lang.String getServerName()
The name or address of the LDAP server.

The ServerName property specifies the IP address (IP number in dotted internet format) or Domain Name of the directory server. It is set before a connection is attempted and cannot be changed once a connection is in progress.

If the ServerName property is set to a Domain Name, a DNS request is initiated and upon successful termination of the request, the ServerName property is set to the corresponding address. If the search is not successful, an error is returned.


setServerName

public void setServerName(java.lang.String serverName)
                   throws IPWorksSSLException
The name or address of the LDAP server.

The ServerName property specifies the IP address (IP number in dotted internet format) or Domain Name of the directory server. It is set before a connection is attempted and cannot be changed once a connection is in progress.

If the ServerName property is set to a Domain Name, a DNS request is initiated and upon successful termination of the request, the ServerName property is set to the corresponding address. If the search is not successful, an error is returned.

IPWorksSSLException

getServerPort

public int getServerPort()
The server port for LDAP (default 389).

A valid port number (a value between 1 and 65535) is required for the connection to take place. The property must be set before a connection is attempted and cannot be changed once a connection is established. Any attempt to change this property while connected will fail with an error.

For implicit SSL, use port 636 (please refer to the SSLStartMode property for more information).


setServerPort

public void setServerPort(int serverPort)
                   throws IPWorksSSLException
The server port for LDAP (default 389).

A valid port number (a value between 1 and 65535) is required for the connection to take place. The property must be set before a connection is attempted and cannot be changed once a connection is established. Any attempt to change this property while connected will fail with an error.

For implicit SSL, use port 636 (please refer to the SSLStartMode property for more information).

IPWorksSSLException

getSortAttributes

public java.lang.String getSortAttributes()
A string of attribute names to sort on with optional relative matching rules.

When set prior to a Search , entries returned by the server will be sorted according to SortAttributes . The format consists of one or more attribute names separated by spaces. Each attribute may be followed by an optional matching rule.

If matching rules are defined, they should be separated from the attribute names with a "/".

Normally the values are returned in ascending order. If descending (reverse) order of sorting is desired, the attribute type must be preceded with a "-".

Examples:

 LDAPControl.SortAttributes = "loginTime"
 
 LDAPControl.SortAttributes = "name/caseIgnoreSubstringsMatch age/numericStringSubstringsMatch"
 
 LDAPControl.SortAttributes = "cn age/1.3.6.1.4.1.1466.115.121.1.27"
 
 LDAPControl.SortAttributes = "-cn age/1.3.6.1.4.1.1466.115.121.1.27" 
Matching Rules for Equality Filters
1.3.6.1.4.1.1466.115.121.1.38
objectIdentifierMatch
1.3.6.1.4.1.1466.115.121.1.12
distinguishedNameMatch
1.3.6.1.4.1.1466.115.121.1.15
caseIgnoreMatch
1.3.6.1.4.1.1466.115.121.1.36
numericStringMatch
1.3.6.1.4.1.1466.115.121.1.41
caseIgnoreListMatch
1.3.6.1.4.1.1466.115.121.1.27
integerMatch
1.3.6.1.4.1.1466.115.121.1.6
bitStringMatch
1.3.6.1.4.1.1466.115.121.1.50
telephoneNumberMatch
1.3.6.1.4.1.1466.115.121.1.43
presentationAddressMatch
1.3.6.1.4.1.1466.115.121.1.34
uniqueMemberMatch
1.3.6.1.4.1.1466.115.121.1.42
protocolInformationMatch
1.3.6.1.4.1.1466.115.121.1.24
generalizedTimeMatch
1.3.6.1.4.1.1466.115.121.1.26
caseExactIA5Match
1.3.6.1.4.1.1466.115.121.1.26
caseIgnoreIA5Match
Matching Rules for Inequality Filters
1.3.6.1.4.1.1466.115.121.1.24
generalizedTimeOrderingMatch
1.3.6.1.4.1.1466.115.121.1.15
caseIgnoreOrderingMatch
Matching Rules for Substring Filters
1.3.6.1.4.1.1466.115.121.1.58
caseIgnoreSubstringsMatch
1.3.6.1.4.1.1466.115.121.1.58
telephoneNumberSubstringsMatch
1.3.6.1.4.1.1466.115.121.1.58
numericStringSubstringsMatch
Matching Rules for Subschema Attributes
1.3.6.1.4.1.1466.115.121.1.27
integerFirstComponentMatch
1.3.6.1.4.1.1466.115.121.1.38
objectIdentifierFirstComponentMatch


setSortAttributes

public void setSortAttributes(java.lang.String sortAttributes)
                       throws IPWorksSSLException
A string of attribute names to sort on with optional relative matching rules.

When set prior to a Search , entries returned by the server will be sorted according to SortAttributes . The format consists of one or more attribute names separated by spaces. Each attribute may be followed by an optional matching rule.

If matching rules are defined, they should be separated from the attribute names with a "/".

Normally the values are returned in ascending order. If descending (reverse) order of sorting is desired, the attribute type must be preceded with a "-".

Examples:

 LDAPControl.SortAttributes = "loginTime"
 
 LDAPControl.SortAttributes = "name/caseIgnoreSubstringsMatch age/numericStringSubstringsMatch"
 
 LDAPControl.SortAttributes = "cn age/1.3.6.1.4.1.1466.115.121.1.27"
 
 LDAPControl.SortAttributes = "-cn age/1.3.6.1.4.1.1466.115.121.1.27" 
Matching Rules for Equality Filters
1.3.6.1.4.1.1466.115.121.1.38
objectIdentifierMatch
1.3.6.1.4.1.1466.115.121.1.12
distinguishedNameMatch
1.3.6.1.4.1.1466.115.121.1.15
caseIgnoreMatch
1.3.6.1.4.1.1466.115.121.1.36
numericStringMatch
1.3.6.1.4.1.1466.115.121.1.41
caseIgnoreListMatch
1.3.6.1.4.1.1466.115.121.1.27
integerMatch
1.3.6.1.4.1.1466.115.121.1.6
bitStringMatch
1.3.6.1.4.1.1466.115.121.1.50
telephoneNumberMatch
1.3.6.1.4.1.1466.115.121.1.43
presentationAddressMatch
1.3.6.1.4.1.1466.115.121.1.34
uniqueMemberMatch
1.3.6.1.4.1.1466.115.121.1.42
protocolInformationMatch
1.3.6.1.4.1.1466.115.121.1.24
generalizedTimeMatch
1.3.6.1.4.1.1466.115.121.1.26
caseExactIA5Match
1.3.6.1.4.1.1466.115.121.1.26
caseIgnoreIA5Match
Matching Rules for Inequality Filters
1.3.6.1.4.1.1466.115.121.1.24
generalizedTimeOrderingMatch
1.3.6.1.4.1.1466.115.121.1.15
caseIgnoreOrderingMatch
Matching Rules for Substring Filters
1.3.6.1.4.1.1466.115.121.1.58
caseIgnoreSubstringsMatch
1.3.6.1.4.1.1466.115.121.1.58
telephoneNumberSubstringsMatch
1.3.6.1.4.1.1466.115.121.1.58
numericStringSubstringsMatch
Matching Rules for Subschema Attributes
1.3.6.1.4.1.1466.115.121.1.27
integerFirstComponentMatch
1.3.6.1.4.1.1466.115.121.1.38
objectIdentifierFirstComponentMatch

IPWorksSSLException

getSSLAcceptServerCert

public byte[] getSSLAcceptServerCert()
Instructs the bean to unconditionally accept the server certificate that matches the supplied certificate.

If it finds any issues with the certificate presented by the server, the bean will normally terminate the connection with an error.

You may override this behavior by supplying a value for SSLAcceptServerCert . If the certificate supplied in SSLAcceptServerCert is the same as the certificate presented by the server, then the server certificate is accepted unconditionally, and the connection will continue normally.

Please note that this functionality is provided only for cases where you otherwise know that you are communicating with the right server. If used improperly, these property will create a security breach. Use it at your own risk.


setSSLAcceptServerCert

public void setSSLAcceptServerCert(byte[] SSLAcceptServerCert)
                            throws IPWorksSSLException
Instructs the bean to unconditionally accept the server certificate that matches the supplied certificate.

If it finds any issues with the certificate presented by the server, the bean will normally terminate the connection with an error.

You may override this behavior by supplying a value for SSLAcceptServerCert . If the certificate supplied in SSLAcceptServerCert is the same as the certificate presented by the server, then the server certificate is accepted unconditionally, and the connection will continue normally.

Please note that this functionality is provided only for cases where you otherwise know that you are communicating with the right server. If used improperly, these property will create a security breach. Use it at your own risk.

IPWorksSSLException

getSSLCertEncoded

public byte[] getSSLCertEncoded()
The SSL certificate (PEM/base64 encoded).

This property is used to assign a specific certificate for SSL client authentication (SSL server authentication in the case of the IPDaemonS bean). The SSLCertStore and SSLCertSubject properties may also be used to specify a certificate.

When SSLCertEncoded is set, a search is initiated in the current SSLCertStore for the private key of the certificate. If the key is found, SSLCertSubject is updated to reflect the full subject of the selected certificate, otherwise SSLCertSubject is set to empty string.


setSSLCertEncoded

public void setSSLCertEncoded(byte[] SSLCertEncoded)
                       throws IPWorksSSLException
The SSL certificate (PEM/base64 encoded).

This property is used to assign a specific certificate for SSL client authentication (SSL server authentication in the case of the IPDaemonS bean). The SSLCertStore and SSLCertSubject properties may also be used to specify a certificate.

When SSLCertEncoded is set, a search is initiated in the current SSLCertStore for the private key of the certificate. If the key is found, SSLCertSubject is updated to reflect the full subject of the selected certificate, otherwise SSLCertSubject is set to empty string.

IPWorksSSLException

getSSLCertStore

public byte[] getSSLCertStore()
The name of the certificate store for the client certificate.

The SSLCertStoreType property specifies the type of the certificate store specified by SSLCertStore . If the store is password protected, specify the password in SSLCertStorePassword .

SSLCertStore is used in conjunction with the SSLCertSubject property in order to specify client certificates. If SSLCertStore has a value, and SSLCertSubject or SSLCertEncoded is set, a search for a certificate is initiated. Please refer to the SSLCertSubject property for details.

Designations of certificate stores are platform-dependent.

The following are designations of the most common User and Machine certificate stores in Windows:

MY
A certificate store holding personal certificates with their associated private keys.
CA
Certifying authority certificates.
ROOT
Root certificates.
SPC
Software publisher certificates.

In Java, the certificate store normally is a file containing certificates and optional private keys.

When the certificate store type is PFXFile, this property must be set to the name of the file. When the type is PFXBlob, the property must be set to the binary contents of a PFX file (i.e. PKCS12 certificate store).

If the provider is OpenSSL, the certificate store is a file containing a certificate and a private key. This property must be set to the name of the file.


setSSLCertStore

public void setSSLCertStore(byte[] SSLCertStore)
                     throws IPWorksSSLException
The name of the certificate store for the client certificate.

The SSLCertStoreType property specifies the type of the certificate store specified by SSLCertStore . If the store is password protected, specify the password in SSLCertStorePassword .

SSLCertStore is used in conjunction with the SSLCertSubject property in order to specify client certificates. If SSLCertStore has a value, and SSLCertSubject or SSLCertEncoded is set, a search for a certificate is initiated. Please refer to the SSLCertSubject property for details.

Designations of certificate stores are platform-dependent.

The following are designations of the most common User and Machine certificate stores in Windows:

MY
A certificate store holding personal certificates with their associated private keys.
CA
Certifying authority certificates.
ROOT
Root certificates.
SPC
Software publisher certificates.

In Java, the certificate store normally is a file containing certificates and optional private keys.

When the certificate store type is PFXFile, this property must be set to the name of the file. When the type is PFXBlob, the property must be set to the binary contents of a PFX file (i.e. PKCS12 certificate store).

If the provider is OpenSSL, the certificate store is a file containing a certificate and a private key. This property must be set to the name of the file.

IPWorksSSLException

getSSLCertStorePassword

public java.lang.String getSSLCertStorePassword()
The password for the certificate store (if any).

If the certificate store is of a type that requires a password, the value of this property is used to open the certificate store.


setSSLCertStorePassword

public void setSSLCertStorePassword(java.lang.String SSLCertStorePassword)
                             throws IPWorksSSLException
The password for the certificate store (if any).

If the certificate store is of a type that requires a password, the value of this property is used to open the certificate store.

IPWorksSSLException

getSSLCertStoreType

public int getSSLCertStoreType()
The type of certificate store for the client certificate.

This property can take one of the following values:

0 (sstUser - default)
For Windows, this specifies that the certificate store is a certificate store owned by the current user. For Java, this specifies that the certificate store is the name of a JKS (Java Key Store) file. If the provider is OpenSSL, this specifies that the certificate store is a file that contains PEM encoded certificate and private key.
1 (sstMachine)
The certificate store is a machine store (not available in Java and when provider is OpenSSL).
2 (sstPFXFile)
The certificate store is the name of a PFX (PKCS12) file containing certificates. If the provider is OpenSSL, the file may contain only one certificate and private key.
3 (sstPFXBlob)
The certificate store is a string (binary or base64 encoded) representing a certificate store in PFX (PKCS12) format.This setting is currently not supported when the provider is OpenSSL.

4 (sstPEMKey)
The certificate store is a string or filename that contains a PEM encoded certificate and private key.This store type is currently not supported in Java.


setSSLCertStoreType

public void setSSLCertStoreType(int SSLCertStoreType)
                         throws IPWorksSSLException
The type of certificate store for the client certificate.

This property can take one of the following values:

0 (sstUser - default)
For Windows, this specifies that the certificate store is a certificate store owned by the current user. For Java, this specifies that the certificate store is the name of a JKS (Java Key Store) file. If the provider is OpenSSL, this specifies that the certificate store is a file that contains PEM encoded certificate and private key.
1 (sstMachine)
The certificate store is a machine store (not available in Java and when provider is OpenSSL).
2 (sstPFXFile)
The certificate store is the name of a PFX (PKCS12) file containing certificates. If the provider is OpenSSL, the file may contain only one certificate and private key.
3 (sstPFXBlob)
The certificate store is a string (binary or base64 encoded) representing a certificate store in PFX (PKCS12) format.This setting is currently not supported when the provider is OpenSSL.

4 (sstPEMKey)
The certificate store is a string or filename that contains a PEM encoded certificate and private key.This store type is currently not supported in Java.

IPWorksSSLException

getSSLCertSubject

public java.lang.String getSSLCertSubject()
The subject of the certificate used for client authentication.

When this property is set, a search is performed in the current certificate store certificate with matching subject.

If an exact match is not found, the store is searched for subjects containing the value of the property.

When setting the property to a partial subject, CN= should be omitted. For example, the following code would find the certificate with subject CN=Test Certificate, OU=People, C=US

Example (Searching with partial subject)

 Control.CertSubject = "Test" 

If a match is not found, the property is set to an empty string, and no certificate is selected.

The special value "*" picks a random certificate in the certificate store.

If a matching certificate is found, the SSLCertSubject property is set to the full subject of the matching certificate.


setSSLCertSubject

public void setSSLCertSubject(java.lang.String SSLCertSubject)
                       throws IPWorksSSLException
The subject of the certificate used for client authentication.

When this property is set, a search is performed in the current certificate store certificate with matching subject.

If an exact match is not found, the store is searched for subjects containing the value of the property.

When setting the property to a partial subject, CN= should be omitted. For example, the following code would find the certificate with subject CN=Test Certificate, OU=People, C=US

Example (Searching with partial subject)

 Control.CertSubject = "Test" 

If a match is not found, the property is set to an empty string, and no certificate is selected.

The special value "*" picks a random certificate in the certificate store.

If a matching certificate is found, the SSLCertSubject property is set to the full subject of the matching certificate.

IPWorksSSLException

getSSLServerCert

public byte[] getSSLServerCert()
The server certificate for the last established connection.

SSLServerCert contains the server certificate for the last established connection.

SSLServerCert is reset every time a new connection is attempted.


getSSLServerCertStatus

public java.lang.String getSSLServerCertStatus()
The verification status of the server certificate for the last established connection.

When the verification fails, SSLServerCertStatus contains a string that indicates the reason(s) why, otherwise, it contains the string "OK".

Please note that the value of SSLServerCertStatus must be considered as only a suggestion as to the validity of the certificate. Application software must use its own logic to determine whether to accept the certificate or not, by using the SSLServerCert to access other certificate properties, or other application-specific information.

SSLServerCertStatus is reset an empty string every time a new connection is attempted.


getSSLStartMode

public int getSSLStartMode()
Determines how the bean starts the SSL negotiation.

The SSLStartMode property may have one of the following values:

0 (sslAutomatic - default)
If the remote port is set to the standard plaintext port of the protocol (where applicable), the bean will behave the same as if SSLStartMode is set to sslExplicit . In all other cases, SSL negotiation will be implicit ( sslImplicit ).
1 (sslImplicit)
The SSL negotiation will start immediately after the connection is established.
2 (sslExplicit)
The bean will first connect in plaintext, and then explicitly start SSL negotiation through a protocol command such as STARTTLS.
3 (sslNone)
No SSL negotiation, no SSL security. All communication will be in plaintext mode.


setSSLStartMode

public void setSSLStartMode(int SSLStartMode)
                     throws IPWorksSSLException
Determines how the bean starts the SSL negotiation.

The SSLStartMode property may have one of the following values:

0 (sslAutomatic - default)
If the remote port is set to the standard plaintext port of the protocol (where applicable), the bean will behave the same as if SSLStartMode is set to sslExplicit . In all other cases, SSL negotiation will be implicit ( sslImplicit ).
1 (sslImplicit)
The SSL negotiation will start immediately after the connection is established.
2 (sslExplicit)
The bean will first connect in plaintext, and then explicitly start SSL negotiation through a protocol command such as STARTTLS.
3 (sslNone)
No SSL negotiation, no SSL security. All communication will be in plaintext mode.

IPWorksSSLException

getTimeout

public int getTimeout()
A timeout for the bean.

If the Timeout property is set to 0, all operations return immediately, potentially failing with an error if they can't be completed immediately.

If Timeout is set to a positive value, the bean will wait for the operation to complete before returning control.

The bean will use DoEvents to enter an efficient wait loop during any potential waiting period, making sure that all system events are processed immediately as they arrive. This ensures that the host application does not "freeze" and remains responsive.

If Timeout expires, and the operation is not yet complete, the bean throws an IPWorksException raises an IPWorksException exception .

Please note that by default, all timeouts are inactivity timeouts , i.e. the timeout period is extended by Timeout seconds when data is successfully sent or received.

Optionally, the behavior of the bean may be changed to absolute timeouts , i.e. the bean will wait for a maximum of Timeout seconds since the beginning of the operation, without extending the timeout period during communications.

This behavior is controlled by theAbsoluteTimeoutconfiguration setting.

The default value for the Timeout property is 60 seconds.


setTimeout

public void setTimeout(int timeout)
                throws IPWorksSSLException
A timeout for the bean.

If the Timeout property is set to 0, all operations return immediately, potentially failing with an error if they can't be completed immediately.

If Timeout is set to a positive value, the bean will wait for the operation to complete before returning control.

The bean will use DoEvents to enter an efficient wait loop during any potential waiting period, making sure that all system events are processed immediately as they arrive. This ensures that the host application does not "freeze" and remains responsive.

If Timeout expires, and the operation is not yet complete, the bean throws an IPWorksException raises an IPWorksException exception .

Please note that by default, all timeouts are inactivity timeouts , i.e. the timeout period is extended by Timeout seconds when data is successfully sent or received.

Optionally, the behavior of the bean may be changed to absolute timeouts , i.e. the bean will wait for a maximum of Timeout seconds since the beginning of the operation, without extending the timeout period during communications.

This behavior is controlled by theAbsoluteTimeoutconfiguration setting.

The default value for the Timeout property is 60 seconds.

IPWorksSSLException

config

public java.lang.String config(java.lang.String configurationString)
                        throws IPWorksSSLException
Sets or retrieves a beanconfiguration setting.

Config is a generic method available in every bean. It is used to set and retrieveconfiguration settingsfor the bean.

Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the bean, access to these internal properties is provided through the Config method.

To set a configuration setting named PROPERTY , you must call Config("PROPERTY=VALUE") , where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).

To read (query) the value of a configuration setting, you must call Config("PROPERTY") . The value will be returned as a string.

IPWorksSSLException

abandon

public void abandon(int messageId)
             throws IPWorksSSLException
Ask the server to abandon a request.

Ask the server to abandon the request specified by MessageId . The result of the operation is returned via the Result event.

IPWorksSSLException

add

public void add()
         throws IPWorksSSLException
Add an entry specified by DN to the directory server using the attributes defined in AttrType and AttrValue . All Entries are required to have an objectClass attribute.

Add the entry specified by DN to the directory. The result of the operation is returned via the Result event.

Example (Add a New Entry)

 LDAPControl.DN = "uid=NewUser,ou=Employees,dc=server"
 LDAPControl.AttrCount = 7
 LDAPControl.AttrType(0) = "objectClass"
 LDAPControl.AttrValue(0) = "top"
 LDAPControl.AttrType(1) = "objectClass"
 LDAPControl.AttrValue(1) = "Person"
 LDAPControl.AttrType(2) = "objectClass"
 LDAPControl.AttrValue(2) = "organizationalPerson"
 LDAPControl.AttrType(3) = "objectClass"
 LDAPControl.AttrValue(3) = "inetorgperson"
 LDAPControl.AttrType(4) = "sn"
 LDAPControl.AttrValue(4) = "UserName"
 LDAPControl.AttrType(5) = "cn"
 LDAPControl.AttrValue(5) = "New S. UserName"
 LDAPControl.AttrType(6) = "uid"
 LDAPControl.AttrValue(6) = "NewUser"
 LDAPControl.Add() 

IPWorksSSLException

bind

public void bind()
          throws IPWorksSSLException
Connect and bind to the directory server.

Connect and bind to the directory server. If the Password property has a value, it is used for authentication. If not, the Bind is performed anonymously. The result of the operation is returned via the Result event.

Example (Binding)

 LDAPControl.DN = "uid=TThompson,ou=Employees,dc=server"
 LDAPControl.Password = "mypassword"
 LDAPControl.Bind()
 
 LDAPControl.DN = "Domain/Username"
 LDAPControl.Password = "mypassword"
 LDAPControl.Bind() 

IPWorksSSLException

compare

public void compare()
             throws IPWorksSSLException
Compare attributes and values with those of the entry specified by DN .

Compare attributes and values specified via the AttrType and AttrValue properties, with the values in the directory for the entry specified by DN . The result of the operation is returned via the Result event.

IPWorksSSLException

delete

public void delete()
            throws IPWorksSSLException
Delete an entry specified by DN from the directory server.

Delete the entry specified by DN from the directory. The result of the operation is returned via the Result event.

IPWorksSSLException

doEvents

public void doEvents()
              throws IPWorksSSLException
Processes events from the internal message queue.

When DoEvents is called, the bean processes any available events. If no events are available, it waits for a preset period of time, and then returns.

IPWorksSSLException

extendedRequest

public void extendedRequest(java.lang.String requestName,
                            byte[] requestValue)
                     throws IPWorksSSLException
Perform an LDAP V3 Extended Operation.

RequestName must contain the OID of the operation, and RequestValue may contain an optional value.

IPWorksSSLException

interrupt

public void interrupt()
               throws IPWorksSSLException
Interrupt the current method.

If there is no method in progress, Interrupt simply returns doing nothing.

IPWorksSSLException

modify

public void modify()
            throws IPWorksSSLException
Perform an LDAP 'modify' operation on the entry specified by DN .

Perform an LDAP 'modify' operation on the entry specified by DN . The attribute(s) to modify should be set via the AttrCount and AttrType property array. The new value(s) should be set in the AttrValue property array.

The modification can be a replacement, an addition (for multivalued attributes), and deletion. See the AttrModOp property for more details. The result of the operation is returned via the Result event.

Example (Modify an Entry - Replace an Attribute Value)

 LDAPControl.DN = "uid=TThompson,ou=Employees,dc=server"
 LDAPControl.AttrCount = 1
 LDAPControl.AttrType(0) = "description"
 LDAPControl.AttrValue(0) = "changed"
 LDAPControl.AttrModOp(0) = amoReplace
 LDAPControl.Modify() 

IPWorksSSLException

modifyRDN

public void modifyRDN(java.lang.String newRDN)
               throws IPWorksSSLException
Perform an LDAP 'modify RDN' operation an entry specified by DN .

Perform an LDAP 'modify RDN' operation on the entry specified by DN .

NewRDN is the new RDN for the entry specified by DN

The result of the operation is returned via the Result event.

IPWorksSSLException

search

public void search(java.lang.String searchFilter)
            throws IPWorksSSLException
Search the directory server using the base object specified in DN and the search filter SearchFilter .

Search the directory server using the base object specified in the DN and the search filter specified in the SearchFilter parameter. Additional search parameters are specified through the SearchScope , SearchDerefAliases , SearchSizeLimit , SearchTimeLimit , and SearchReturnValues properties.

Results are returned through zero or more SearchResult events, after which a SearchComplete event is fired.

Example (Searching for a User)

 LDAPControl.DN = "ou=Employees,dc=server"
 LDAPControl.Search("uid=TThompson") 

A DSE Search (Directory Specific Entries) will search for attributes of the server itself. Example (DSE Search)

 LDAPControl.DN = "" 
 LDAPControl.SearchScope = 0
 LDAPControl.Search("objectClass=*") 

SearchFilter is a string representation of the LDAP search filter used for the search.

The format of the search filter is specified by RFC 1558 and is identical to the format used by most LDAP applications.

The following are examples of search filters, as provided in the RFC:

 (cn=Babs Jensen)
      (!(cn=Tim Howes))
      (&(objectClass=Person)(|(sn=Jensen)(cn=Babs J*)))
      (o=univ*of*mich*) 

The complete specification is given by the following BNF:

 <filter> ::= "(" <filtercomp> ")"
      <filtercomp> ::= <and> | <or> | <not> | <item>
      <and> ::= "&" <filterlist>
      <or> ::= "|" <filterlist>
      <not> ::= "!" <filter>
      <filterlist> ::= <filter> | <filter> <filterlist>
      <item> ::= <simple> | <present> | <substring>
      <simple> ::= <attr> <filtertype> <value>
      <filtertype> ::= <equal> | <approx> | <greater> | <less>
      <equal> ::= "="
      <approx> ::= "~="
      <greater> ::= ">="
      <less> ::= "<="
      <present> ::= <attr> "=*"
      <substring> ::= <attr> "=" <initial> <any> <final>
      <initial> ::= NULL | <value>
      <any> ::= "*" <starval>
      <starval> ::= NULL | <value> "*" <starval>
      <final> ::= NULL | <value> 

<attr> is a string representing an attribute type as defined in RFC 1777. <value> is a string representing an attribute value, or part of one, and has the form defined in RFC 1779. If a <value> must contain one of the characters '*' or '(' or ')', these should be escaped by preceding them with the backslash '\\' character.

IPWorksSSLException

unbind

public void unbind()
            throws IPWorksSSLException
Unbind from the directory server.

Unbind from the directory server and break the connection.

IPWorksSSLException

addLdapsEventListener

public void addLdapsEventListener(LdapsEventListener l)
                           throws java.util.TooManyListenersException
java.util.TooManyListenersException

removeLdapsEventListener

public void removeLdapsEventListener(LdapsEventListener l)

IP*Works! SSL V6

Copyright (c) 2004 /n software inc. - All rights reserved.