MBS Plugin Documentation

Search:

Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchie

New in Version 7.0 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 8.0 8.1 8.2 8.3 8.4 8.5 8.6 8.7 9.0

The list of the   themes,   classes,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

KeyChainItemMBS.Add
method, KeyChain, MBS Mac Plugin (KeyChain), class KeyChainItemMBS, Console safe, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Adds a password or other KeyChain item to the default KeyChain.
Notes:
You can use the Add function to add a password or other KeyChain item to the permanent data store of the default KeyChain. If you want to add a password to a KeyChain other than the default, call the function SetDefaultKeychain to change the default KeyChain. Add will automatically call the unlock function to display the Unlock KeyChain dialog box if the KeyChain containing the item is currently locked.

Lasterror is set.
class KeyChainItemMBS
class, KeyChain, MBS Mac Plugin (KeyChain), class KeyChainItemMBS, Console safe, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: A class for an item inside a KeyChain.
Notes:
Some keychain constants:

Common attributes:
kClassKCItemAttr "clas"Item class (KCItemClass)
kCreationDateKCItemAttr "cdat"Date the item was created (Integer)
kModDateKCItemAttr "mdat"Last time the item was updated (Integer)
kDescriptionKCItemAttr "desc"User-visible description string (string)
kCommentKCItemAttr "icmt"User's comment about the item (string)
kCreatorKCItemAttr "crtr"Item's creator (OSType)
kTypeKCItemAttr "type"Item's type (OSType)
kScriptCodeKCItemAttr "scrp"Script code for all strings (ScriptCode)
kLabelKCItemAttr "labl"Item label (string)
kInvisibleKCItemAttr "invi"Invisible (boolean)
kNegativeKCItemAttr "nega"Negative (boolean)
kCustomIconKCItemAttr "cusi"Custom icon (boolean)
kAccountKCItemAttr "acct"User account (string)
Unique Generic password attributes:
kServiceKCItemAttr "svce"Service (string)
kGenericKCItemAttr "gena"User-defined attribute (untyped bytes)
Unique Internet password attributes:
kSecurityDomainKCItemAttr "sdmn"Security domain (string)
kServerKCItemAttr "srvr"Server's domain name or IP address (string)
kAuthTypeKCItemAttr "atyp"Authentication Type (KCAuthType)
kPortKCItemAttr "port"Port (UInt16)
kPathKCItemAttr "path"Path (string)
Unique Appleshare password attributes:
kVolumeKCItemAttr "vlme"Volume (string)
kAddressKCItemAttr "addr"Server address (IP or domain name) or zone name (string)
kSignatureKCItemAttr "ssig"Server signature block (AFPServerSignature)
Unique AppleShare and Internet attributes:
kProtocolKCItemAttr "ptcl"Protocol (KCProtocolType)
Certificate attributes:
kSubjectKCItemAttr "subj"Subject distinguished name (DER-encoded data)
kCommonNameKCItemAttr "cn "Common Name (UTF8-encoded string)
kIssuerKCItemAttr "issu"Issuer distinguished name (DER-encoded data)
kSerialNumberKCItemAttr "snbr"Certificate serial number (DER-encoded data)
kEMailKCItemAttr "mail"E-mail address (ASCII-encoded string)
kPublicKeyHashKCItemAttr "hpky"Hash of public key (KCPublicKeyHash), 20 bytes max.
kIssuerURLKCItemAttr "iurl"URL of the certificate issuer (ASCII-encoded string)
Shared by keys and certificates:
kEncryptKCItemAttr "encr"Encrypt (Boolean)
kDecryptKCItemAttr "decr"Decrypt (Boolean)
kSignKCItemAttr "sign"Sign (Boolean)
kVerifyKCItemAttr "veri"Verify (Boolean)
kWrapKCItemAttr "wrap"Wrap (Boolean)
kUnwrapKCItemAttr "unwr"Unwrap (Boolean)
kStartDateKCItemAttr "sdat"Start Date (Integer)
kEndDateKCItemAttr "edat"End Date (Integer)
KeyChainItemMBS.Copy(dest as KeyChainMBS) as KeyChainItemMBS
method, KeyChain, MBS Mac Plugin (KeyChain), class KeyChainItemMBS, Console safe, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Copies a password or other KeyChain item from one KeyChain to another.
Notes:
You can use the Copy function to copy a KeyChain item from one KeyChain to another. Copy will automatically call the unlock function to display the Unlock KeyChain dialog box if the KeyChain containing the item to be copied is currently locked.

Lasterror is set.
KeyChainItemMBS.Delete
method, KeyChain, MBS Mac Plugin (KeyChain), class KeyChainItemMBS, Console safe, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Deletes a password or other KeyChain item from the default KeyChain.
Notes:
You can use the Delete function to delete a KeyChain item from the permanent data store of the default KeyChain. Delete will automatically call the unlock function to display the Unlock KeyChain dialog box if the KeyChain containing the item is currently locked.

Lasterror is set.
KeyChainItemMBS.GetMemory(what as string, size as integer) as memoryblock
method, KeyChain, MBS Mac Plugin (KeyChain), class KeyChainItemMBS, Console safe, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Determines KeyChain item data.
Notes:
You can call GetString or the function GetMemory to obtain KeyChain item data.

If the KeyChain that contains the item is locked, before calling SetString or SetMemory you should call the unlock function to prompt the user to unlock the KeyChain.

You can determine any of the standard item attributes identified by the following tag constants kDescriptionKCItemAttr, kCommentKCItemAttr, kLabelKCItemAttr, kCreatorKCItemAttr, kTypeKCItemAttr, and kCustomIconKCItemAttr. In addition, each class of KeyChain item has attributes specific to that class which may be set or modified.

Size is the size of the memorybuffer allocated to store the result. The actual string may be shorted.

For a list of the codes for what see the list on the SetString function.

Lasterror is set.
KeyChainItemMBS.GetString(what as string, size as integer) as string
method, KeyChain, MBS Mac Plugin (KeyChain), class KeyChainItemMBS, Console safe, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Determines KeyChain item data.
Example:
dim m as new KeyChainManagerMBS
dim s as KeyChainSearchItemMBS
dim it as KeyChainItemMBS
dim text as string

const kServiceKCItemAttr="svce"
const kAccountKCItemAttr="acct"

listbox1.DeleteAllRows

s=m.KeyChainFindFirst(nil)

do
it=s.Item

text=it.GetString(kServiceKCItemAttr,1000)
if text="RBTest" then
Listbox1.AddRow it.GetString(kAccountKCItemAttr,1000)
end if
loop until not s.FindNext

Notes:
You can call GetString or the function GetMemory to obtain KeyChain item data.

If the KeyChain that contains the item is locked, before calling SetString or SetMemory you should call the unlock function to prompt the user to unlock the KeyChain.

You can determine any of the standard item attributes identified by the following tag constants kDescriptionKCItemAttr, kCommentKCItemAttr, kLabelKCItemAttr, kCreatorKCItemAttr, kTypeKCItemAttr, and kCustomIconKCItemAttr. In addition, each class of KeyChain item has attributes specific to that class which may be set or modified.

For a list of the codes for what see the list on the SetString function.

Size is the size of the memorybuffer allocated to store the result. The actual string may be shorted.

Lasterror is set.
KeyChainItemMBS.handle as integer
property, KeyChain, MBS Mac Plugin (KeyChain), class KeyChainItemMBS, Console safe, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Simply a handle of type KCItemRef.
Notes: (Read only property)
KeyChainItemMBS.Lasterror as Integer
property, KeyChain, MBS Mac Plugin (KeyChain), class KeyChainItemMBS, Console safe, Plugin version: 6.3, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The number representing the last error reported.
Notes:
If a function is not available (e.g. KeyChain Manager not installed), the lasterror property has the value -1. If the plugin was unable to allocate memory, -2 is returned.

KeyChain Manager error codes:

errKCNotAvailable-25291Indicates that the KeyChain Manager was not loaded.
errKCReadOnly-25292Returned by the function KCCopyItem to indicate that the KeyChain file is read-only and cannot be edited.
errKCAuthFailed-25293Returned by the function KCUnlock to indicate that the authentication failed (too many unsuccessful retries).
errKCNoSuchKeychain-25294Returned by the functions KCUnlock, KCSetDefaultKeychain, KCGetStatus, and KCGetIndKeychain to indicate that the specified KeyChain was not found.
errKCInvalidKeychain-25295Returned by the functions KCUnlock, KCSetDefaultKeychain, KCGetStatus, KCGetKeychainName, KCChangeSettings, and KCCreateKeychain to indicate that the KeyChain is not valid.
errKCDuplicateKeychain-25296Returned by the function KCCreateKeychain to indicate that your application tried to create a KeyChain that already exists.
errKCDuplicateCallback-25297Returned by the function KCAddCallback to indicate that your callback function was already registered.
errKCInvalidCallback-25298Returned by the function KCRemoveCallback to indicate that the callback function was not previously registered.
errKCDuplicateItem-25299Returned by the functions KCAddAppleSharePassword, KCAddInternetPassword, KCAddInternetPasswordWithPath, KCAddGenericPassword, and KCAddItem to indicate that you tried to add an existing KeyChain item to the KeyChain.
errKCItemNotFound-25300Returned by the functions KCFindAppleSharePassword, KCFindInternetPassword, KCFindInternetPasswordWithPath, KCFindGenericPassword, KCFindNextItem, and KCFindFirstItem to indicate that no matching item was found.
errKCBufferTooSmall-25301Returned by the functions KCFindAppleSharePassword, KCFindInternetPassword, KCFindInternetPasswordWithPath, KCFindGenericPassword, KCGetAttribute, KCGetData, and KCFindX509Certificates to indicate that the buffer was not large enough to contain the password data.
errKCDataTooLarge-25302Returned by the functions KCAddAppleSharePassword, KCAddInternetPassword, KCAddInternetPasswordWithPath, KCAddGenericPassword, KCSetAttribute, and KCSetData to indicate that the data is too large.
errKCNoSuchAttr-25303Returned by the functions KCSetAttribute, KCGetAttribute, and KCFindFirstItem to indicate that no such attribute exists.
errKCInvalidItemRef-25304Returned by the functions KCSetAttribute, KCGetAttribute, KCSetData, KCGetData, KCAddItem, KCDeleteItem, KCUpdateItem, KCCopyItem, and KCGetKeychain to indicate that the KeyChain item reference is invalid.
errKCInvalidSearchRef-25305Returned by the functions KCFindNextItem and KCReleaseSearch to indicate that the specified search reference is invalid.
errKCNoSuchClass-25306Returned by the function KCCopyItem to indicate that the item class does not exist.
errKCNoDefaultKeychain-25307Returned by the functions KCChangeSettings, KCSetDefaultKeychain, KCGetDefaultKeychain, KCAddAppleSharePassword, KCAddInternetPassword, KCAddInternetPasswordWithPath, KCAddGenericPassword, KCFindAppleSharePassword, KCFindInternetPassword, KCFindInternetPasswordWithPath, KCFindGenericPassword, KCCopyItem, KCAddItem, KCDeleteItem, KCUpdateItem, KCFindNextItem, KCFindFirstItem, and KCFindX509Certificates to indicate that there is no default KeyChain.
errKCInteractionNotAllowed-25308Returned by the functions KCCreateKeychain, KCChangeSettings, KCUnlock, and KCGetData (the latter two only when the Unlock Dialog and Allow Access dialog boxes are needed) to indicate that there is no start-up KeyChain.
errKCReadOnlyAttr-25309Returned by the function KCSetAttribute to indicate that the KeyChain item attribute is read-only.
errKCWrongKCVersion-25310Indicates that the wrong version of KeyChain Manager is installed to perform this operation.
errKCKeySizeNotAllowed-25311Indicates that the key size is illegal.
errKCNoStorageModule-25312Returned by functions that prompts the loading of the KeyChain Manager to indicate that the storage module is not found.
errKCNoCertificateModule-25313Returned when a function is required for a certificate and the certificate module is not found.
errKCNoPolicyModule-25314Returned when a function is required for a trust policy and the policy module is not found.
errKCInteractionRequired-25315Returned by the function KCUnlock to indicate that user interaction is required for this operation.
errKCDataNotAvailable-25316Indicates that the requested data is not available.
errKCDataNotModifiable-25317Returned by the functions KCSetData and KCGetData to indicate that the data cannot be modified.
errKCCreateChainFailed-25318Returned by the functions KCChooseCertificate and KCFindX509Certificates to indicate that the attempt to create a new KeyChain failed.
(Read only property)
KeyChainItemMBS.SearchKeyChain as KeyChainMBS
method, KeyChain, MBS Mac Plugin (KeyChain), class KeyChainItemMBS, Console safe, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Determines the location of a password or other KeyChain item.
Notes:
The SearchKeyChain function determines the location of a KeyChain item that in an unlocked KeyChain. It will not search locked keychains. SearchKeyChain may display the Unlock KeyChain dialog box if the KeyChain containing the item is currently locked.

Lasterror is set.
KeyChainItemMBS.SetMemory(what as string, data as memoryblock) as boolean
method, KeyChain, MBS Mac Plugin (KeyChain), class KeyChainItemMBS, Console safe, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Sets or edits KeyChain item data.
Notes:
,#
See the SetString function for details.
KeyChainItemMBS.SetString(what as string, data as string) as boolean
method, KeyChain, MBS Mac Plugin (KeyChain), class KeyChainItemMBS, Console safe, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Sets or edits KeyChain item data.
Notes:
You can call SetString or the function SetMemory to set or modify KeyChain item data.

If the KeyChain that contains the item is locked, before calling SetString or SetMemory you should call the unlock function to prompt the user to unlock the KeyChain. The KeyChain must permit read/write access in order to modify KeyChain item data.

You can only set or modify standard item attributes identified by the tag constants kDescriptionKCItemAttr, kCommentKCItemAttr, kLabelKCItemAttr, kCreatorKCItemAttr, kTypeKCItemAttr, and kCustomIconKCItemAttr. In addition, each class of KeyChain item has attributes specific to that class which may be set or modified.

A list of the attribute codes:

kClassKCItemAttr "clas"Item class (KCItemClass)
kCreationDateKCItemAttr "cdat"Date the item was created (UInt32)
kModDateKCItemAttr "mdat"Last time the item was updated (UInt32)
kDescriptionKCItemAttr "desc"User-visible description string (string)
kCommentKCItemAttr "icmt"User's comment about the item (string)
kCreatorKCItemAttr "crtr"Item's creator (OSType)
kTypeKCItemAttr "type"Item's type (OSType)
kScriptCodeKCItemAttr "scrp"Script code for all strings (ScriptCode)
kLabelKCItemAttr "labl"Item label (string)
kInvisibleKCItemAttr "invi"Invisible (boolean)
kNegativeKCItemAttr "nega"Negative (boolean)
kCustomIconKCItemAttr "cusi"Custom icon (boolean)
kAccountKCItemAttr "acct"User account (string)
Unique Generic password attributes
kServiceKCItemAttr "svce"Service (string)
kGenericKCItemAttr "gena"User-defined attribute (untyped bytes)
Unique Internet password attributes
kSecurityDomainKCItemAttr "sdmn"Security domain (string)
kServerKCItemAttr "srvr"Server's domain name or IP address (string)
kAuthTypeKCItemAttr "atyp"Authentication Type (KCAuthType)
kPortKCItemAttr "port"Port (UInt16)
kPathKCItemAttr "path"Path (string)
Unique Appleshare password attributes
kVolumeKCItemAttr "vlme"Volume (string)
kAddressKCItemAttr "addr"Server address (IP or domain name) or zone name (string)
kSignatureKCItemAttr "ssig"Server signature block (AFPServerSignature)
Unique AppleShare and Internet attributes
kProtocolKCItemAttr "ptcl"Protocol (KCProtocolType)
Certificate attributes
kSubjectKCItemAttr "subj"Subject distinguished name (DER-encoded data)
kCommonNameKCItemAttr "cn "Common Name (UTF8-encoded string)
kIssuerKCItemAttr "issu"Issuer distinguished name (DER-encoded data)
kSerialNumberKCItemAttr "snbr"Certificate serial number (DER-encoded data)
kEMailKCItemAttr "mail"E-mail address (ASCII-encoded string)
kPublicKeyHashKCItemAttr "hpky"Hash of public key (KCPublicKeyHash), 20 bytes max.
kIssuerURLKCItemAttr "iurl"URL of the certificate issuer (ASCII-encoded string)
Shared by keys and certificates
kEncryptKCItemAttr "encr"Encrypt (Boolean)
kDecryptKCItemAttr "decr"Decrypt (Boolean)
kSignKCItemAttr "sign"Sign (Boolean)
kVerifyKCItemAttr "veri"Verify (Boolean)
kWrapKCItemAttr "wrap"Wrap (Boolean)
kUnwrapKCItemAttr "unwr"Unwrap (Boolean)
kStartDateKCItemAttr "sdat"Start Date (UInt32)
kEndDateKCItemAttr "edat"End Date (UInt32)

Lasterror is set.
KeyChainItemMBS.Update
method, KeyChain, MBS Mac Plugin (KeyChain), class KeyChainItemMBS, Console safe, Plugin version: 2.6, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Updates a password or other KeyChain item.
Notes:
You can use the Update function to update a password or other KeyChain item in a KeyChainMBS’s permanent data store after changing its data. Update will automatically call the unlock function to display the Unlock KeyChain dialog box if the KeyChain containing the item is currently locked.

Lasterror is set.

The items on this page are in the following plugins: MBS Mac Plugin.