11 Oracle Key Vault Client SDK KMIP Attributes and Custom Attributes APIs
This section describes the interfaces that help create and interpret both KMIP attributes and KMIP custom attributes.
- Oracle Key Vault KMIP Attributes APIs
Oracle Key Vault provides a set of APIs to manage KMIP attributes. - Oracle Key Vault KMIP Custom Attribute APIs
The KMIP Custom Attribute APIs are listed in this section.
Parent topic: Oracle Key Vault Client C SDK API Reference
11.1 Oracle Key Vault KMIP Attributes APIs
Oracle Key Vault provides a set of APIs to manage KMIP attributes.
- About the Oracle Key Vault KMIP Attribute APIs
This section describes the interfaces that help create and interpret Oracle Key Vault KMIP attributes. - Attribute Index and Element Index
Element index can be used to retrieve child TTLV objects from the parent TTLV object and attribute index is the property of a KMIP Attribute. - okvAddAttributeObject
okvAddAttributeObject
adds an attribute object to the parentTTLV
object. - okvAttrAddActivationDate
okvAttrAddActivationDate
adds the activation date attribute to OKVTTLV parent object. - okvAttrAddCompromiseDate
okvAttrAddCompromiseDate
adds a compromise date attribute to OKVTTLV parent object. - okvAttrAddCompromiseOccurrenceDate
okvAttrAddCompromiseOccurrenceDate
adds a compromise occurrence date attribute to OKVTTLV parent object. - okvAttrAddContactInfo
okvAttrAddContactInfo
adds a contact information attribute to the OKVTTLV parent object. - okvAttrAddCryptoAlgo
okvAttrAddCryptoAlgo
adds a cryptographic algorithm attribute to the OKVTTLV parent object. - okvAttrAddCryptoLen
okvAttrAddCryptoLen
adds a cryptographic length attribute to the OKVTTLV parent object. - okvAttrAddCryptoParams
okvAttrAddCryptoParams
adds cryptographic parameters to the OKVTTLV parent object. - okvAttrAddCryptoUsageMask
okvAttrAddCryptoUsageMask
adds a cryptographic usage mask attribute to the OKVTTLV parent object. - okvAttrAddDeactivationDate
okvAttrAddDeactivationDate
adds a deactivation date attribute to the OKVTTLV parent object. - okvAttrAddDestroyDate
okvAttrAddDestroyDate
adds a destroy date attribute to the OKVTTLV parent object. - okvAttrAddDigest
okvAttrAddDigest
adds a digest attribute to the OKVTTLV object. - okvAttrAddFresh
okvAttrAddFresh
adds a fresh attribute to the OKVTTLV parent object. - okvAttrAddLeaseTime
okvAttrAddLeaseTime
adds a lease time attribute to the OKVTTLV parent object. - okvAttrAddName
okvAttrAddName
adds a name attribute to the OKVTTLV parent object. - okvAttrAddObjectGroup
okvAttrAddObjectGroup
adds an object group attribute to the OKVTTLV parent object. - okvAttrAddObjectType
okvAttrAddObjectType
adds an object type attribute to the OKVTTLV parent object. - okvAttrAddProcessStartDate
okvAttrAddProcessStartDate
adds a process start date attribute to the OKVTTLV parent object. - okvAttrAddProtectStopDate
okvAttrAddProtectStopDate
adds a protect stop date attribute to the OKVTTLV parent object. - okvAttrAddRevocationReason
okvAttrAddRevocationReason
adds the revocation reason attribute to the OKVTTLV parent object. - okvAttrAddUniqueID
okvAttrAddUniqueID
adds a unique identifier attribute to the OKVTTLV parent object. - okvAttrAddUsageLimits
okvAttrAddUsageLimits
adds a usage limits attribute to the OKVTTLV parent object. - okvAttrGetActivationDate
okvAttrGetActivationDate
gets the activation date attribute. - okvAttrGetArchiveDate
okvAttrGetArchiveDate
gets the archive date attribute. - okvAttrGetCompromiseDate
okvAttrGetCompromiseDate
gets the compromise date attribute. - okvAttrGetCompromiseOccurrenceDate
okvAttrGetCompromiseOccurrenceDate
gets the compromise occurrence date attribute. - okvAttrGetContactInfo
okvAttrGetContactInfo
gets the contact information attribute. - okvAttrGetContactInfoLen
okvAttrGetContactInfoLen
gets the length of the contact information of the contact information attribute. - okvAttrGetCryptoAlgo
okvAttrGetCryptoAlgo
gets the cryptographic algorithm attribute. - okvAttrGetCryptoLen
okvAttrGetCryptoLen
gets the cryptographic length attribute. - okvAttrGetCryptoParams
okvAttrGetCryptoParams
gets the cryptographic parameters attribute found at or after element indexelem_index
. - okvAttrGetCryptoUsageMask
okvAttrGetCryptoUsageMask
gets the cryptographic usage mask attribute. - okvAttrGetDeactivationDate
okvAttrGetDeactivationDate
gets the deactivation date attribute. - okvAttrGetDestroyDate
okvAttrGetDestroyDate
gets the destroy date attribute. - okvAttrGetDigest
okvAttrGetDigest
gets the digest attribute found at or after element indexelem_index
. - okvAttrGetDigestLen
okvAttrGetDigestLen
gets the length of the digest value of the digest attribute found at or after element indexelem_index
. - okvAttrGetFresh
okvAttrGetFresh
gets the fresh attribute. - okvAttrGetInitialDate
okvAttrGetInitialDate
gets the initial date attribute. - okvAttrGetLastChangeDate
okvAttrGetLastChangeDate
gets the last change date attribute. - okvAttrGetLeaseTime
okvAttrGetLeaseTime
gets the lease time attribute. - okvAttrGetName
okvAttrGetName
gets the name value, attribute index, and name type of the name attribute found at or after element indexelem_index
. - okvAttrGetNameValueLen
okvAttrGetNameValueLen
gets the length of the name value of the name attribute found at or after element indexelem_index
. - okvAttrGetObjectGroup
okvAttrGetObjectGroup
gets the object group of the object group attribute found at or after element indexelem_index
. - okvAttrGetObjectGroupLen
okvAttrGetObjectGroupLen
gets the length of the object group found at or after element indexelem_index
. - okvAttrGetObjectType
okvAttrGetObjectType
gets the object type attribute. - okvAttrGetProcessStartDate
okvAttrGetProcessStartDate
gets the process start date attribute. - okvAttrGetProtectStopDate
okvAttrGetProtectStopDate
gets the protect stop date attribute. - okvAttrGetRevocationReason
okvAttrGetRevocationReason
gets the revocation reason attribute. - okvAttrGetRevocationReasonMessageLen
okvAttrGetRevocationReasonMessageLen
gets the length of the revocation message of the revocation reason attribute. - okvAttrGetState
okvAttrGetState
gets the state attribute. - okvAttrGetUniqueID
okvAttrGetUniqueID
gets the unique ID attribute. - okvAttrGetUniqueIDLen
okvAttrGetUniqueIDLen
gets the length of the unique identifier attribute. - okvAttrGetUsageLimits
okvAttrGetUsageLimits
gets the usage limits attribute. - okvGetAttributeObject
okvGetAttributeObject
gets the attribute, its name, and index from the parent attribute found at element indexelem_index
.
11.1.1 About the Oracle Key Vault KMIP Attribute APIs
This section describes the interfaces that help create and interpret Oracle Key Vault KMIP attributes.
For the functions in this section, all of the functions with arguments
env
and ttlv
have the following meaning:
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault Environment handle. |
ttlv |
IN |
TTLV parent object. |
OKVTTLV
*
), the return value has the following interpretation:
- On success, a valid TTLV object for the attribute is returned.
- On failure, a NULL pointer is returned.
- On success, the length of the buffer is returned.
- On failure, zero (0) is returned.
- On success,
OKV_SUCCESS
is returned. - On failure, a valid error number is returned for the error on top of the error stack.
okvAttrAddAttr
: Adds the attribute to the OKVTTLV parent object.okvAttrGetAttrLen
: Gets the value length of the attribute in OKVTTLV parent object for KMIP Attributes that don’t have fixed length.okvAttrGetAttrElementLen
: Gets the value length of the element of the attribute in the OKVTTLV parent object for STRUCTURE attributes that have child values with variable length. An example is the name value of thename
attribute.okvAttrGetAttr
: Gets the attribute in the OKVTTLV parent object.
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.2 Attribute Index and Element Index
Element index can be used to retrieve child TTLV objects from the parent TTLV object and attribute index is the property of a KMIP Attribute.
An OKVTTLV parent object can have a number of child OKVTTLV objects. The child objects usually have different KMIP tags. Some of the child objects like, multi-instance attributes can be repeated, so there can be a few child objects with the same tag.
The immediate child objects of an OKVTTLV object can be thought of as an indexed list. The child OKVTTLV objects can be retrieved one by one from the parent object by specifying the index. This index is the element index of the child TTLV object.
okvTTLVGetChild should be used to retrieve the child by specifying the element index.
In most cases however, the child being looked up is known. The child is usually identified by a tag. But what is not known is the index of the child TTLV object.
okvTTLVGetChildByTag is used to lookup the child with a given tag.
With this API we generally guess that the child is found at particular index. The API will look for the first occurrence of the child from this index onwards and will return the actual index where the child was found.
Usually we should start with index 0, to get the first occurrence of the child with a given tag. The returned element index will specify where the child was found.
The element index can be incremented by one and
okvTTLVGetChildByTag
can be called again to get the second
occurrence of the child with the same tag.
The first occurrence of child with a given tag can also be done by using okvTTLVGetFirstChildByTag
.
This behavior is true for any Oracle Key Vault function that takes element index as an argument.
As an example using the OKVTTLV Parent Object table below, calling
okvTTLVGetChildByTag("Name", &elem_index)
with
elem_index
set to 1 will return object with Ref# C, and set the
elem_index
to 2. Again calling okvTTLVGetChildByTag("Object
Group", &elem_index)
with elem_index
set to 4 will
return object with Ref# E, and set the elem_index
to 4.
Table 11-1 OKVTTLV Parent Object
Ref # | Attribute Object | Element Index | Attribute Index |
---|---|---|---|
A |
Name |
0 |
1 |
B |
Object Group |
1 |
1 |
C |
Name |
2 |
3 |
D |
Name |
3 |
2 |
E |
Object Group |
4 |
2 |
Attribute index is the property of a KMIP Attribute. Oracle Key Vault returns the attribute index to the endpoint program when requested or the endpoint program can add one when modifying or adding an attribute. Oracle Key Vault does not do any special processing for the attribute index and does not use it for lookup operations.
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.3 okvAddAttributeObject
okvAddAttributeObject
adds an attribute object to the parent TTLV
object.
Catetory
KMIP attribute API
Purpose
okvAddAttributeObject
adds an attribute object to the parent TTLV object. The actual attribute value can be added using the functions defined in this section.
Syntax
OKVTTLV* okvAddAttributeObject(OKVEnv *env, OKVTTLV *ttlv, OKVAttrNo attrno, ub4 attr_index);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault Environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV object. |
attrno |
IN |
Attribute number of the attribute being added. |
attr_index |
IN |
Attribute index of the attribute. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with attribute object TTLV indicated by
argument Failure: |
Comments
The API can be used to add attribute TTLVs to the parent TTLV object. The below example shows how a contact info attribute can be added to the parent TTLV object.
Example
oratext *contact = (oratext *)"sample contact info"; ub4 contactl = strlen((char *) contact); OKVTTLV *resultttlv; resultttlv = okvAddAttributeObject(env, ttlv, OKVAttrContactInfo, (ub4) 0); okvAttrAddContactInfo(env, resultttlv, contact, contactl);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.4 okvAttrAddActivationDate
okvAttrAddActivationDate
adds the activation date attribute
to OKVTTLV parent object.
Catetory
KMIP attribute API
Purpose
okvAttrAddActivationDate
adds the activation date attribute to
OKVTTLV parent object.
Syntax
OKVTTLV *okvAttrAddActivationDate(OKVEnv *env, OKVTTLV *ttlv, ub8 activation_date);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV object. |
activation_date |
IN |
Activation date. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with activation date attribute value added. Failure: NULL pointer. |
Comments
None.
Example
time_t current_time = time((time_t *)NULL); ... okvAttrAddActivationDate(env, attr_in, (ub8) current_time + 10000);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.5 okvAttrAddCompromiseDate
okvAttrAddCompromiseDate
adds a compromise date attribute to
OKVTTLV parent object.
Catetory
KMIP attribute API
Purpose
okvAttrAddCompromiseDate
adds a compromise date attribute to
OKVTTLV parent object.
Syntax
OKVTTLV *okvAttrAddCompromiseDate(OKVEnv *env, OKVTTLV *ttlv, ub8 comp_date);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to OKVTTLV object. |
comp_date |
IN |
Compromise date. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with compromise date attribute value added. Failure: |
Comments
None.
Example
time_t current_time = time((time_t *)NULL); OKVTTLV *resultttlv; resultttlv = okvAttrAddCompromiseDate(env, ttlv, (ub8) current_time + 24*3600);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.6 okvAttrAddCompromiseOccurrenceDate
okvAttrAddCompromiseOccurrenceDate
adds a compromise
occurrence date attribute to OKVTTLV parent object.
Catetory
KMIP attribute API
Purpose
okvAttrAddCompromiseOccurrenceDate
adds a compromise occurrence
date attribute to OKVTTLV parent object.
Syntax
OKVTTLV *okvAttrAddCompromiseOccurrenceDate(OKVEnv *env, OKVTTLV *ttlv, ub8 comp_occr_date);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV object. |
comp_occr_date |
IN |
Compromise occurrence date. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with compromise occurrence date attribute value added. Failure: |
Comments
None.
Example
ub8 comp_date; ctime(&comp_date); resulttlv = okvAttrAddCompromiseOccurrenceDate(env, ttlv, comp_date);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.7 okvAttrAddContactInfo
okvAttrAddContactInfo
adds a contact information attribute
to the OKVTTLV parent object.
Catetory
KMIP attribute API
Purpose
okvAttrAddContactInfo
adds a contact information attribute to the
OKVTTLV parent object.
Syntax
OKVTTLV *okvAttrAddContactInfo(OKVEnv *env, OKVTTLV *ttlv, oratext *contact_info, ub4 contact_infol);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV object. |
contact_info |
IN |
Contact information. |
contact_infol |
IN |
Length of contact information. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with contact info attribute value added. Failure: |
Comments
None.
Example
OKVTTLV *resulttlv; oratext *new_contact = (oratext *)"abc.xyz@com"; ub4 new_contactl = strlen((char *) new_contact); resulttlv = okvAttrAddContactInfo(env, attr_in, new_contact, new_contactl);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.8 okvAttrAddCryptoAlgo
okvAttrAddCryptoAlgo
adds a cryptographic algorithm
attribute to the OKVTTLV parent object.
Catetory
KMIP attribute API
Purpose
okvAttrAddCryptoAlgo
adds a cryptographic algorithm attribute to
the OKVTTLV parent object.
Syntax
OKVTTLV *okvAttrAddCryptoAlgo(OKVEnv *env, OKVTTLV *ttlv, ub4 crypto_alg);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV object. |
crypto_alg |
IN |
Cryptographic algorithm. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with cryptographic algorithm attribute value added. Failure: NULL pointer. |
Comments
None.
Example
attr = okvAddAttributeObject(env, templ, OKVAttrCryptoAlg, 0); okvAttrAddCryptoAlgo(env, attr, (ub4)CRYPTO_ALG_AES);
11.1.9 okvAttrAddCryptoLen
okvAttrAddCryptoLen
adds a cryptographic length attribute
to the OKVTTLV parent object.
Catetory
KMIP attribute API
Purpose
okvAttrAddCryptoLen
adds a cryptographic length attribute to the
OKVTTLV parent object.
Syntax
OKVTTLV *okvAttrAddCryptoLen(OKVEnv *env, OKVTTLV *ttlv, ub4 crypto_len);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV object. |
crypto_len |
IN |
Cryptographic length. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with cryptographic length attribute value added. Failure: |
Comments
None.
Example
attr = okvAddAttributeObject(env, templ, OKVAttrCryptoLen, 0); okvAttrAddCryptoLen(env, attr, (ub4)128);
11.1.10 okvAttrAddCryptoParams
okvAttrAddCryptoParams
adds cryptographic parameters to the
OKVTTLV parent object.
Catetory
KMIP attribute API
Purpose
okvAttrAddCryptoParams
adds cryptographic parameters to the OKVTTLV
parent object.
Syntax
OKVTTLV *okvAttrAddCryptoParams(OKVEnv *env, OKVTTLV *ttlv, ub4 block_cipher_mode, ub4 padding_method, ub4 hashing_algorithm, ub4 key_role_type);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent TTLV. |
block_cipher_mode |
IN |
Block cipher mode. |
padding_method |
IN |
Padding method. |
hashing_algorithm |
IN |
Hashing algorithm. |
key_role_type |
IN |
Key role type. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with cryptographic parameters added. Failure: |
Comments
None.
Example
okvAttrAddCryptoParams(env, ttlv, BLK_CIPHER_ECB, PADDING_SSL3, HASH_ALG_MD4, KEY_ROLE_CVK);
11.1.11 okvAttrAddCryptoUsageMask
okvAttrAddCryptoUsageMask
adds a cryptographic usage mask
attribute to the OKVTTLV parent object.
Catetory
KMIP attribute API
Purpose
okvAttrAddCryptoUsageMask
adds a cryptographic usage mask attribute
to the OKVTTLV parent object.
Syntax
OKVTTLV *okvAttrAddCryptoUsageMask(OKVEnv *env, OKVTTLV *ttlv, ub4 mask);
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV Object. |
mask |
IN |
Cryptographic usage mask. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with cryptographic usage mask attribute value added. Failure: |
Comments
None.
Example
OKVTTLV *resultttlv; resultttlv = okvAttrAddCryptoUsageMask(env, ttlv, (ub4)12);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.12 okvAttrAddDeactivationDate
okvAttrAddDeactivationDate
adds a deactivation date
attribute to the OKVTTLV parent object.
Catetory
KMIP attribute API
Purpose
okvAttrAddDeactivationDate
adds a deactivation date attribute to
the OKVTTLV parent object.
Syntax
OKVTTLV *okvAttrAddDeactivationDate(OKVEnv *env, OKVTTLV *ttlv, ub8 deactivation_date);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV object. |
deactivation_date |
IN |
Deactivation date |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with deactivation date attribute value added. Failure: |
Comments
None.
Example
time_t current_time = time((time_t *)NULL); ... okvAttrAddDeactivationDate(env, ttlv, (ub8) current_date + 1800);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.13 okvAttrAddDestroyDate
okvAttrAddDestroyDate
adds a destroy date attribute to the
OKVTTLV parent object.
Catetory
KMIP attribute API
Purpose
okvAttrAddDestroyDate
adds a destroy date attribute to the OKVTTLV
parent object.
Syntax
OKVTTLV *okvAttrAddDestroyDate(OKVEnv *env, OKVTTLV *ttlv, ub8 destroy_date);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV Object. |
destroy_date |
IN |
Destroy date. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with destroy date attribute value added. Failure: |
Comments
None.
Example
time_t current_time = time((time_t *)NULL); ... okvAttrAddDestroyDate(env, attr_in, (ub8) current_time + 24*3*3600);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.14 okvAttrAddDigest
okvAttrAddDigest
adds a digest attribute to the OKVTTLV
object.
Catetory
KMIP attribute API
Purpose
okvAttrAddDigest
adds a digest attribute to the OKVTTLV object.
Syntax
OKVTTLV *okvAttrAddDigest(OKVEnv *env, OKVTTLV *ttlv, ub4 hash_algo, ub4 key_format_type, oratext *digest, ub4 digestl);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV Object. |
hash_algo |
IN |
Hash algorithm. |
key_format_type |
IN |
Key format type. |
digest |
IN |
Digest value. |
digestl |
IN |
Digest value length. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with digest attribute values added. Failure: |
Comments
None.
Example
oratext digest[] = "Sample_Digest"; okvAddAttributeObject(env, ttlv, OKVAttrDigest, 1); resulttlv = okvAttrAddDigest(env, ttlv, HASH_ALG_SHA_1, OKVDEF_KEY_FMT_OPAQUE, &digest[0], sizeof(digest))
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.15 okvAttrAddFresh
okvAttrAddFresh
adds a fresh attribute to the OKVTTLV parent
object.
Catetory
KMIP attribute API
Purpose
okvAttrAddFresh
adds a fresh attribute to the OKVTTLV parent
object.
Syntax
OKVTTLV *okvAttrAddFresh(OKVEnv *env, OKVTTLV *ttlv, ub8 fresh);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV Object. |
fresh |
IN |
Fresh attribute. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with fresh attribute value added. Failure: NULL pointer. |
Comments
The fresh attribute can take values 0 or 1 for false or true respectively.
Example
OKVTTLV *resulttlv; resulttlv = okvAttrAddFresh(env, attr_in, (ub8) 1);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.16 okvAttrAddLeaseTime
okvAttrAddLeaseTime
adds a lease time attribute to the
OKVTTLV parent object.
Catetory
KMIP attribute API
Purpose
okvAttrAddLeaseTime
adds a lease time attribute to the OKVTTLV
parent object.
Syntax
OKVTTLV *okvAttrAddLeaseTime(OKVEnv *env, OKVTTLV *ttlv, ub4 lease_time);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV Object. |
lease_time |
IN |
Lease time. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with lease time attribute value added. Failure: |
Comments
None.
Example
OKVTTLV *resulttlv; resulttlv = okvAttrAddLeaseTime(env, ttlv, (ub4)100);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.17 okvAttrAddName
okvAttrAddName
adds a name attribute to the OKVTTLV parent
object.
Catetory
KMIP attribute API
Purpose
okvAttrAddName
adds a name attribute to the OKVTTLV parent
object.
Syntax
OKVTTLV *okvAttrAddName(OKVEnv *env, OKVTTLV *ttlv, oratext *name, ub4 namel, ub4 typ);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV Object. |
name |
IN |
Name value of the name attribute. |
name1 |
IN |
Length of name value of the name attribute. |
typ |
IN |
Type of the name attribute. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with name attribute value added. Failure: |
Comments
None.
Example
oratext[] name_value = "sample name"; ub4 name_valuel = strlen((const char *)name_value); okvAttrAddName(env, attr_in, (oratext *) name_value, name_valuel, 1);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.18 okvAttrAddObjectGroup
okvAttrAddObjectGroup
adds an object group attribute to the
OKVTTLV parent object.
Catetory
KMIP attribute API
Purpose
okvAttrAddObjectGroup
adds an object group attribute to the OKVTTLV
parent object.
Syntax
OKVTTLV *okvAttrAddObjectGroup(OKVEnv *env, OKVTTLV *ttlv, oratext *object_group, ub4 object_groupl);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV Object. |
object_group |
IN |
Object group of the object group attribute. |
object_groupl |
IN |
Length of object group of the object group attribute. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with object group attribute value added. Failure: |
Comments
None.
Example
OKVTTLV *resulttlv; oratext obj_grp[] = "Object_Group"; resulttlv = okvAttrAddObjectGroup(env, ttlv, &obj_grp[0], sizeof(obj_grp));
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.19 okvAttrAddObjectType
okvAttrAddObjectType
adds an object type attribute to the
OKVTTLV parent object.
Catetory
KMIP atrribute API
Purpose
okvAttrAddObjectType
adds an object type attribute to the OKVTTLV
parent object.
Syntax
OKVTTLV *okvAttrAddObjectType(OKVEnv *env, OKVTTLV *ttlv, OKVObjNo typ);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV Object. |
typ |
IN |
Type of the object type attribute. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with object type attribute value added. Failure: |
Comments
None.
Example
okvAttrAddObjectType(env, req, OKVObjSymmetric);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.20 okvAttrAddProcessStartDate
okvAttrAddProcessStartDate
adds a process start date
attribute to the OKVTTLV parent object.
Catetory
KMIP attribute API
Purpose
okvAttrAddProcessStartDate
adds a process start date attribute to
the OKVTTLV parent object.
Syntax
OKVTTLV *okvAttrAddProcessStartDate(OKVEnv *env, OKVTTLV *ttlv, ub8 process_start_date);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV Object. |
process_start_date |
IN |
Process start date. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with process start date attribute value added. Failure: |
Comments
None.
Example
time_t current_time = time((time_t *)NULL); ... okvAttrAddProcessStartDate(env, attr_temp, (ub8) current_time + 1000);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.21 okvAttrAddProtectStopDate
okvAttrAddProtectStopDate
adds a protect stop date
attribute to the OKVTTLV parent object.
Catetory
KMIP attribute API
Purpose
okvAttrAddProtectStopDate
adds a protect stop date attribute to the
OKVTTLV parent object.
Syntax
OKVTTLV *okvAttrAddProtectStopDate(OKVEnv *env, OKVTTLV *ttlv, ub8 protect_stop_date);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV Object. |
protect_stop_date |
IN |
Protect stop date. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with protect stop date attribute value added. Failure: |
Comments
None.
Example
time_t current_time = time((time_t *)NULL); ... okvAttrAddProtectStopDate(env, attr_in, (ub8) current_time + 24*3600);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.22 okvAttrAddRevocationReason
okvAttrAddRevocationReason
adds the revocation reason
attribute to the OKVTTLV parent object.
Catetory
KMIP attribute API
Purpose
okvAttrAddRevocationReason
adds the revocation reason attribute to
the OKVTTLV parent object.
Syntax
OKVTTLV *okvAttrAddRevocationReason(OKVEnv *env, OKVTTLV *ttlv, ub4 code, oratext *msg, ub4 msgl);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV object. |
code |
IN |
Revocation code. |
msg |
IN |
Revocation message. |
msgl |
IN |
Revocation message length. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with revocation attribute values added. Failure: |
Comments
None.
Example
oratext msg[] = "Object_Compromised"; OKVTTLV *resulttlv; resulttlv = okvAttrAddRevocationReason(env, ttlv, OKVDEF_REV_CODE_KEY_COMP, &msg[0], sizeof(msg));
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.23 okvAttrAddUniqueID
okvAttrAddUniqueID
adds a unique identifier attribute to
the OKVTTLV parent object.
Catetory
KMIP attribute API
Purpose
okvAttrAddUniqueID
adds a unique identifier attribute to the
OKVTTLV parent object.
Syntax
OKVTTLV *okvAttrAddUniqueID(OKVEnv *env, OKVTTLV *ttlv, oratext *uid, ub4 uidl);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV object. |
uid |
IN |
Unique identifier. |
uid1 |
IN |
Unique identifier length. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with the unique identifier attribute value added. Failure: |
Comments
None.
Example
OKVTTLV *resultttlv; oratext uidval[] = "12345678901234567890"; resultttlv = okvAttrAddUniqueID(env, ttlv, &uidval[0], strlen(uidval));
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.24 okvAttrAddUsageLimits
okvAttrAddUsageLimits
adds a usage limits attribute to the
OKVTTLV parent object.
Catetory
KMIP attribute API
Purpose
okvAttrAddUsageLimits
adds a usage limits attribute to the OKVTTLV
parent object.
Syntax
OKVTTLV *okvAttrAddUsageLimits(OKVEnv *env, OKVTTLV *ttlv, ub8 total, ub8 count, ub4 unit);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV object. |
total |
IN |
Usage limits total. |
count |
IN |
Usage limits count. |
unit |
IN |
Usage limits type. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with usage limits attribute value added. Failure: |
Comments
None.
Example
OKVTTLV *resulttlv; resulttlv = okvAttrAddUsageLimits(env, ttlv, (ub8) 256, (ub8) 256, (ub4) 1);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.25 okvAttrGetActivationDate
okvAttrGetActivationDate
gets the activation date attribute.
Catetory
KMIP attribute API
Purpose
okvAttrGetActivationDate
gets the activation date attribute from
the OKVTTLV object.
Syntax
OKVErrNo okvAttrGetActivationDate(OKVEnv *env, OKVTTLV *ttlv, ub8 *activation_date);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV Object. |
activation_date |
OUT |
Activation date. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failure: A valid error number is returned for the error on top of the error stack. |
Comments
None.
Example
ub8 act_date; okvAttrGetActivationDate(env, ttlv, &act_date);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.26 okvAttrGetArchiveDate
okvAttrGetArchiveDate
gets the archive date attribute.
Catetory
KMIP attribute API
Purpose
okvAttrGetArchiveDate
gets the archive date attribute from the
OKVTTLV object.
Syntax
OKVErrNo okvAttrGetArchiveDate(OKVEnv *env, OKVTTLV *ttlv, ub8 *archive_date);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV Object. |
archive_date |
OUT |
Archive date. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failure: A valid error number is returned for the error on top of the error stack. |
Comments
None.
Example
ub8 archive_date; okvAttrGetArchiveDate(env, ttlv, &archive_date);
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.27 okvAttrGetCompromiseDate
okvAttrGetCompromiseDate
gets the compromise date attribute.
Category
KMIP attribute API
Purpose
okvAttrGetCompromiseDate
gets the compromise date attribute from the
OKVTTLV object.
Syntax
OKVErrNo okvAttrGetCompromiseDate(OKVEnv *env, OKVTTLV *ttlv, ub8 *comp_date);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to the OKVTTLV object. |
comp_date |
OUT |
Compromise date. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failure: A valid error number is returned for the error on top of the error stack. |
Comments
None.
Example
ub8 comp_date; okvAttrGetCompromiseDate(env, ttlv, &comp_date);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.28 okvAttrGetCompromiseOccurrenceDate
okvAttrGetCompromiseOccurrenceDate
gets the compromise occurrence date attribute.
Category
KMIP attribute API
Purpose
okvAttrGetCompromiseOccurrenceDate
gets the compromise occurrence
date attribute from the OKVTTLV object.
Syntax
OKVErrNo okvAttrGetCompromiseOccurrenceDate(OKVEnv *env, OKVTTLV *ttlv, ub8 *comp_occr_date);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault Environment handle. |
ttlv |
IN |
Pointer to the OKVTTLV object. |
comp_occr_date |
OUT |
Compromise occurrence date. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failure: A valid error number is returned for the error on top of the error stack. |
Comments
None.
Example
ub8 comp_occ_date; OKVTTLV *resultttlv; resultttlv = okvAttrGetCompromiseOccurrenceDate(env, ttlv, &comp_occ_date);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.29 okvAttrGetContactInfo
okvAttrGetContactInfo
gets the contact information attribute.
Category
KMIP attribute API
Purpose
okvAttrGetContactInfo
gets the contact information attribute from
the OKVTTLV object.
Syntax
OKVErrNo okvAttrGetContactInfo(OKVEnv *env, OKVTTLV *ttlv, oratext *contact_info, ub4 *contact_infol);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault Environment handle |
ttlv |
IN |
Pointer to the parent OKVTTLV Object |
contact_info |
OUT |
Contact information |
contact_infol |
OUT |
Length of contact information |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failure: A valid error number is returned for the error on top of the error stack. |
Comments
The memory for the argument contact_info
must be allocated before you execute the okvAttrGetContactInfo
function call. You can find the size by using okvAttrGetContactInfoLen
.
Example
ub4 contactl; contactl = okvAttrGetContactInfoLen(env, ttlv); contact = calloc(contactl, sizeof(oratext)); okvAttrGetContactInfo(env, ttlv, contact, &contactl);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.30 okvAttrGetContactInfoLen
okvAttrGetContactInfoLen
gets the length of the contact information of the contact information attribute.
Category
KMIP attribute API
Purpose
okvAttrGetContactInfoLen
gets the length of the contact information attribute.
Syntax
ub4 okvAttrGetContactInfoLen(OKVEnv *env, OKVTTLV *ttlv));
Parameters
Parameters | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault Environment handle |
ttlv |
IN |
Pointer to parent OKVTTLV Object |
Return Values
Return Value | Description |
---|---|
ub4 |
Length of the attribute value. Success: Length of the contact information attribute value. Failure: 0. |
Comments
None.
Example
ub4 cinfol; cinfol = okvAttrGetContactInfoLen(env, ttlv);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.31 okvAttrGetCryptoAlgo
okvAttrGetCryptoAlgo
gets the cryptographic algorithm attribute.
Category
KMIP attribute API
Purpose
okvAttrGetCryptoAlgo
gets the cryptographic algorithm attribute from
the parent OKVTTLV object.
Syntax
OKVErrNo okvAttrGetCryptoAlgo(OKVEnv *env, OKVTTLV *ttlv, ub4 *crypto_alg);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault Environment handle. |
ttlv |
IN |
Pointer to the OKVTTLV object. |
crypto_alg |
OUT |
Cryptographic algorithm. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success:
Failure: A valid error number is returned for the error on top of the error stack. |
Comments
None.
Example
ub4 alg = 0; okvAttrGetCryptoAlgo(env, ttlv, &alg);
11.1.32 okvAttrGetCryptoLen
okvAttrGetCryptoLen
gets the cryptographic length attribute.
Category
KMIP attribute API
Purpose
okvAttrGetCryptoLen
gets the cryptographic length attribute from the
OKVTTLV object.
Syntax
OKVErrNo okvAttrGetCryptoLen(OKVEnv *env, OKVTTLV *ttlv, ub4 *crypto_len);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle |
ttlv |
IN |
Pointer to the OKVTTLV object |
crypto_len |
OUT |
Cryptographic length |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success:
Failure: A valid error number is returned for the error on top of the error stack. |
Comments
None.
Example
ub4 len = 0; okvAttrGetCryptoLen(env, ttlv, &len);
11.1.33 okvAttrGetCryptoParams
okvAttrGetCryptoParams
gets the cryptographic parameters
attribute found at or after element index elem_index
.
Category
KMIP attribute API
Purpose
okvAttrGetCryptoParams
gets the cryptographic parameters attribute
found at or after element index elem_index
in the parent TTLV.
Syntax
OKVErrNo okvAttrGetCryptoParams(OKVEnv *env, OKVTTLV *ttlv, ub4 *elem_index, ub4 *block_cipher_mode, ub4 *padding_method, ub4 *hashing_algorithm, ub4 *key_role_type);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent TTLV object. |
elem_index |
IN/OUT |
Element index. |
block_cipher_mode |
OUT |
Block cipher mode. |
padding_method |
OUT |
Padding method. |
hashing_algorithm |
OUT |
Hashing algorithm. |
key_role_type |
OUT |
Key role type. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failure: A valid error number is returned for the error on top of the error stack. |
Comments
None.
Example
ub4 bcm, pm, ha, krt, ind; okvAttrGetCryptoParams(env, ttlv, &ind, &bcm, &pm, &ha, &krt);
11.1.34 okvAttrGetCryptoUsageMask
okvAttrGetCryptoUsageMask
gets the cryptographic usage mask attribute.
Category
KMIP attribute API
Purpose
okvAttrGetCryptoUsageMask
gets the cryptographic usage mask
attribute from the OKVTTLV object.
Syntax
OKVErrNo okvAttrGetCryptoUsageMask(OKVEnv *env, OKVTTLV *ttlv, ub4 *mask);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle |
ttlv |
IN |
Pointer to parent OKVTTLV object |
mask |
OUT |
Cryptographic usage mask |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failure: A valid error number is returned for the error on top of the error stack. |
Comments
None.
Example
ub4 mask = 0; okvAttrGetCryptoUsageMask(env, ttlv, &mask);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.35 okvAttrGetDeactivationDate
okvAttrGetDeactivationDate
gets the deactivation date attribute.
Category
KMIP attribute API
Purpose
okvAttrGetDeactivationDate
gets the deactivation date attribute from
the OKVTTLV object.
Syntax
OKVErrNo okvAttrGetDeactivationDate(OKVEnv *env, OKVTTLV *ttlv, ub8 *deactivation_date);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle |
ttlv |
IN |
Pointer to OKVTTLV object |
deactivation_date |
OUT |
Deactivation date |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failure: A valid error number is returned for the error on top of the error stack. |
Comments
None.
Example
ub8 deact_date; okvAttrGetDeactivationDate(env, ttlv, &deact_date);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.36 okvAttrGetDestroyDate
okvAttrGetDestroyDate
gets the destroy date attribute.
Category
KMIP attribute API
Purpose
okvAttrGetDestroyDate
gets the destroy date attribute from the
OKVTTLV object.
Syntax
OKVErrNo okvAttrGetDestroyDate(OKVEnv *env, OKVTTLV *ttlv, ub8 *destroy_date);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle |
ttlv |
IN |
Pointer to OKVTTLV object |
destroy_date |
OUT |
Destroy date |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failure: A valid error number is returned for the error on top of the error stack. |
Comments
None.
Example
ub8 destroy_date; okvAttrGetDestroyDate(env, ttlv, &destroy_date);
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.37 okvAttrGetDigest
okvAttrGetDigest
gets the digest attribute found at or
after element index elem_index
.
Category
KMIP attribute API
Purpose
okvAttrGetDigest
gets the digest parameters for the OKVTTLV
object.
Syntax
OKVErrNo okvAttrGetDigest(OKVEnv *env, OKVTTLV *ttlv, ub4 *elem_index, ub4 *hash_algo, ub4 *key_format_type, oratext *digest, ub4 *digestl);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV object. |
elem_index |
IN/OUT |
The API will look for the first occurrence of the child with tag OKVDEF_TAG_DIGEST from this index onwards and will return the actual index where the child was found.
|
hash_algo |
OUT |
Hash algorithm. |
key_format_type |
OUT |
Key format type. |
digest |
OUT |
Digest value. |
digestl |
IN/OUT |
Digest value length. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failure: A valid error number is returned for the error on top of the error stack. |
Comments
The memory to store the digest value has to be allocated before this API is called. okvAttrGetDigestLen
can be used to get the digest length.
Example
ub4 ei = 0, digestl = 0, hash_algo, key_format_type; digestl = okvAttrGetDigestLen(env, ttlv, &ei); oratext * digest = (oratext *) calloc(digestl ,sizeof(oratext) ); okvAttrGetDigest(env, ttlv, &ei, &hash_algo, &key_format_type, &digest[0], &digestl);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.38 okvAttrGetDigestLen
okvAttrGetDigestLen
gets the length of the digest value of
the digest attribute found at or after element
index elem_index
.
Category
KMIP attribute API
Purpose
okvAttrGetDigestLen
gets the length of the digest attribute from the
OKVTTLV object.
Syntax
ub4 okvAttrGetDigestLen(OKVEnv *env, OKVTTLV *ttlv, ub4 *elem_index);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to the OKVTTLV object. |
elem_index |
IN/OUT |
The API will look for the first occurrence of the child with tag OKVDEF_TAG_DIGEST from this index onwards and will return the actual index where the child was found.
|
Return Values
Return Value | Description |
---|---|
ub4 |
Length of the attribute value. Success: Length of the digest attribute. Failure: 0. |
Comments
None.
Example
ub4 ei = 0; ub4 digestl; digestl = okvAttrGetDigestLen(env, ttlv, &ei)
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.39 okvAttrGetFresh
okvAttrGetFresh
gets the fresh attribute.
Category
KMIP attribute API
Purpose
okvAttrGetFresh
gets the fresh attribute from the OKVTTLV
object.
Syntax
OKVErrNo okvAttrGetFresh(OKVEnv *env, OKVTTLV *ttlv, ub8 *fresh);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle |
ttlv |
IN |
Pointer to the parent OKVTTLV Object |
fresh |
OUT |
Fresh attribute |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failure: A valid error number is returned for the error on top of the error stack. |
Comments
None.
Example
ub8 fresh_val; okvAttrGetFresh(env, attr, &fresh_val);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.40 okvAttrGetInitialDate
okvAttrGetInitialDate
gets the initial date attribute.
Category
KMIP attribute API
Purpose
okvAttrGetInitialDate
gets the initial date attribute from the
OKVTTLV object.
Syntax
OKVErrNo okvAttrGetInitialDate(OKVEnv *env, OKVTTLV *ttlv, ub8 *initial_date);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault Environment handle. |
ttlv |
IN |
Pointer to OKVTTLV object. |
initial_date | OUT |
Initial date. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failure: A valid error number is returned for the error on top of the error stack. |
Comments
None.
Example
ub8 ini_date; okvAttrGetInitialDate(env, ttlv, &ini_date);
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.41 okvAttrGetLastChangeDate
okvAttrGetLastChangeDate
gets the last change date attribute.
Category
KMIP attribute API
Purpose
okvAttrGetLastChangeDate
gets the last change date attribute from
the OKVTTLV object.
Syntax
OKVErrNo okvAttrGetLastChangeDate(OKVEnv *env, OKVTTLV *ttlv, ub8 *last_change_date);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to OKVTTLV object. |
last_change_date |
OUT |
Last change date. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failure: A valid error number is returned for the error on top of the error stack. |
Comments
None.
Example
ub8 last_change_date; okvAttrGetLastChangeDate(env, ttlv, &last_change_date);
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.42 okvAttrGetLeaseTime
okvAttrGetLeaseTime
gets the lease time attribute.
Category
KMIP attribute API
Purpose
okvAttrGetLeaseTime
gets the lease time attribute from the OKVTTLV
object.
Syntax
OKVErrNo okvAttrGetLeaseTime(OKVEnv *env, OKVTTLV *ttlv, ub4 *lease_time);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault Environment handle. |
ttlv |
IN |
Pointer to the OKVTTLV object. |
lease_time |
OUT |
Lease time. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success:
Failure: A valid error number is returned for the error on top of the error stack. |
Comments
None.
Example
ub4 lease_time; okvAttrGetLeaseTime(env, ttlv, &lease_time);
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.43 okvAttrGetName
okvAttrGetName
gets the name value, attribute index, and
name type of the name attribute found at or after element index
elem_index
.
Category
KMIP attribute API
Purpose
okvAttrGetName
gets the name value, name length, and name type of
the name attribute from the OKVTTLV object.
Syntax
OKVErrNo okvAttrGetName(OKVEnv *env, OKVTTLV *ttlv, ub4 *elem_index, oratext *name, ub4 namel, ub4 *typ)
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to the parent TTLV object. |
elem_index |
IN/OUT |
The API will look for the first occurrence of the child with tag OKVDEF_TAG_NAME_ST from this index onwards and will return the actual index where the child was found.
|
name |
OUT |
Name value of the name attribute. |
name1 |
IN/OUT |
Length of name value of the name attribute. |
typ |
OUT |
Type of the name attribute. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failure: A valid error number is returned for the error on top of the error stack. |
Comments
The memory to store the name value should be allocated before the function call.
Example
ub4 ei = 0; ub4 nametyp; namel = okvAttrGetNameValueLen(env, ttlv, &ei); oratext * name = (oratext *) calloc(namel, sizeof(oratext)); okvAttrGetName(env, ttlv, &ei, name, namel, &nametyp);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.44 okvAttrGetNameValueLen
okvAttrGetNameValueLen
gets the length of the name value of
the name attribute found at or after element index
elem_index
.
Category
KMIP attribute API
Purpose
okvAttrGetNameValueLen
gets the length of the name attribute from
the OKVTTLV object.
Syntax
ub4 okvAttrGetNameValueLen(OKVEnv *env, OKVTTLV *ttlv, ub4 *elem_index;
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to the OKVTTLV buffer to search the name length. |
elem_index |
IN/OUT |
The API will look for the first occurrence of the child with tag
OKVDEF_TAG_NAME_ST from this
index onwards and will return the actual index
where the child was found.
|
Return Values
Return Value | Description |
---|---|
ub4 |
Length of the attribute value. Success: Length of the name attribute. Failure: 0. |
Comments
None.
Example
ei = 0; namel = okvAttrGetNameValueLen(env, ttlv, &ei);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.45 okvAttrGetObjectGroup
okvAttrGetObjectGroup
gets the object group of the object
group attribute found at or after element index elem_index
.
Category
KMIP attribute API
Purpose
okvAttrGetObjectGroup
gets the object group attribute from the
OKVTTLV object.
Syntax
OKVErrNo okvAttrGetObjectGroup(OKVEnv *env, OKVTTLV *ttlv, ub4 *elem_index, oratext *object_group, ub4 *object_groupl);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to OKVTTLV object. |
elem_index |
IN/OUT |
The API will look for the first occurrence of the child with tag OKVDEF_TAG_OBJ_GROUP from this index onwards and will return the actual index where the child was found.
|
object_group |
OUT |
Object group of the object group attribute. |
object_groupl |
IN/OUT |
Length of object group of the object group attribute. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failure: A valid error number is returned for the error on top of the error stack. |
Comments
The memory for object_group
must be allocated before you execute the
function call. Use okvAttrGetObjectGroupLen
to find the size of
memory to be allocated.
Example
ub4 index = 0, obj_grpl; obj_grpl = okvAttrGetObjectGroupLen(env, ttlv, &index); oratext *obj_group = (oratext *)calloc(obj_grpl, sizeof(oratext); okvAttrGetObjectGroup(env, ttlv, &index, &obj_group, &obj_grpl);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.46 okvAttrGetObjectGroupLen
okvAttrGetObjectGroupLen
gets the length of the object
group found at or after element index
elem_index
.
Category
KMIP attribute API
Purpose
okvAttrGetObjectGroupLen
gets the length of the object group from
the OKVTTLV object.
Syntax
ub4 okvAttrGetObjectGroupLen(OKVEnv *env, OKVTTLV *ttlv, ub4 *elem_index);
Parameters
Parameter | IN/OUT | Element index |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to the OKVTTLV object. |
elem_index |
IN/OUT |
The API will look for the first occurrence of the child with tag OKVDEF_TAG_OBJ_GROUP from this index onwards and will return the actual index where the child was found.
|
Return Values
Return Value | Description |
---|---|
ub4 |
Length of the attribute value. Success: Length of the object group attribute value. Failure: 0. |
Comments
None.
Example
ub4 obj_grpl, index = 0; obj_grpl = okvAttrGetObjectGroupLen(env, ttlv, &index);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.47 okvAttrGetObjectType
okvAttrGetObjectType
gets the object type attribute.
Category
KMIP attribute API
Purpose
okvAttrGetObjectType
gets the object type attribute from the OKVTTLV
object.
Syntax
OKVErrNo okvAttrGetObjectType(OKVEnv *env, OKVTTLV *ttlv, OKVObjNo *typ)
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to OKVTTLV object. |
typ |
OUT |
Type of the object type attribute. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success:
Failure: A valid error number is returned for the error on top of the error stack. |
Comments
None.
Example
ub4 typ; okvAttrGetObjectType(env, ttlv, &typ);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.48 okvAttrGetProcessStartDate
okvAttrGetProcessStartDate
gets the process start date attribute.
Category
KMIP attribute API
Purpose
okvAttrGetProcessStartDate
gets the process start date attribute
from the OKVTTLV object.
Syntax
OKVErrNo okvAttrGetProcessStartDate(OKVEnv *env, OKVTTLV *ttlv, ub8 *process_start_date);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to OKVTTLV object. |
process_start_date |
OUT |
Process start date. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failure: A valid error number is returned for the error on top of the error stack. |
Comments
None.
Example
ub8 pstart_date; okvAttrGetProcessStartDate(env, ttlv, &pstart_date);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.49 okvAttrGetProtectStopDate
okvAttrGetProtectStopDate
gets the protect stop date attribute.
Category
KMIP attribute API
Purpose
okvAttrGetProtectStopDate
gets the protect stop date attribute from
the OKVTTLV object.
Syntax
OKVErrNo okvAttrGetProtectStopDate(OKVEnv *env, OKVTTLV *ttlv, ub8 *protect_stop_date);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to OKVTTLV parent object. |
protect_stop_date |
OUT |
Protect stop date. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failure: A valid error number is returned for the error on top of the error stack. |
Comments
None.
Example
ub8 pstop_date; okvAttrGetProtectStopDate(env, ttlv, &pstop_date);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.50 okvAttrGetRevocationReason
okvAttrGetRevocationReason
gets the revocation reason attribute.
Category
KMIP attribute API
Purpose
okvAttrGetRevocationReason
gets the revocation reason attribute
parameters from the OKVTTLV object.
Syntax
OKVErrNo okvAttrGetRevocationReason(OKVEnv *env, OKVTTLV *ttlv, oratext *msg, ub4 *msgl, ub4 *code);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to parent OKVTTLV object. |
code |
OUT |
Revocation code. |
msg |
OUT |
Revocation message. |
msgl |
IN/OUT |
Revocation message length. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failure: A valid error number is returned for the error on top of the error stack. |
Comments
The memory for the msg
argument must be allocated before the
function call. The size of memory to be allocated can be retrieved by using
okvAttrGetRevocationReasonMessageLen
.
Example
ub4 code; msgl = okvAttrGetRevocationReasonMessageLen(env, ttlv); revoke_reason = calloc(msgl, sizeof(oratext)); okvAttrGetRevocationReason(env, ttlv, revoke_reason, &msgl, &code);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.51 okvAttrGetRevocationReasonMessageLen
okvAttrGetRevocationReasonMessageLen
gets the length of the revocation message of the revocation reason attribute.
Category
KMIP attribute API
Purpose
okvAttrGetRevocationReasonMessageLen
gets the length of the
revocation message of the revocation reason attribute from the OKVTTLV object.
Syntax
ub4 okvAttrGetRevocationReasonMessageLen(OKVEnv *env, OKVTTLV *ttlv);
Parameters
Parameters | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to the OKVTTLV object. |
Return Values
Return Value | Description |
---|---|
ub4 |
Length of the attribute value. Success: Length of the revocation message. Failure: 0. |
Comments
None.
Example
ub4 msgl; msgl = okvAttrGetRevocationReasonMessageLen(env, ttlv);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.52 okvAttrGetState
okvAttrGetState
gets the state attribute.
Category
KMIP attribute API
Purpose
okvAttrGetState
gets the state attribute from OKVTTLV object.
Syntax
OKVErrNo okvAttrGetState(OKVEnv *env, OKVTTLV *ttlv, ub4 *state);
Parameters
Parameter | IN/OUT | State |
---|---|---|
env |
IN |
Pointer to parent OKVTTLV object. |
ttlv |
IN |
Pointer to OKVTTLV parent object. |
state |
OUT |
State. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failure: A valid error number is returned for the error on top of the error stack. |
Comments
None.
Example
ub4 val_state; okvAttrGetState(env, attr, &val_state)
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.53 okvAttrGetUniqueID
okvAttrGetUniqueID
gets the unique ID attribute.
Category
KMIP attribute API
Purpose
okvAttrGetUniqueID
gets the unique ID attribute from the OKVTTLV
object.
Syntax
OKVErrNo okvAttrGetUniqueID(OKVEnv *env, OKVTTLV *ttlv, ub4 *elem_index, oratext *uid, ub4 *uidl)
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to the OKVTTLV parent object. |
elem_index |
IN/OUT |
The API will look for the first occurrence of the child with tag OKVDEF_TAG_ID from this index onwards and will store the actual index where the child was found.
|
uid |
OUT |
Pointer to memory storing the unique identifier. |
uid1 |
IN/OUT |
Unique identifier length. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success:
Failure: A valid error number is returned for the error on top of the error stack. |
Comments
The memory to store the UID should be allocated before API is called. To fetch the length, execute okvAttrGetUniqueIDLen
.
Example
ub4 index = 0; ouidl = okvAttrGetUniqueIDLen(env, ttlv, &index); oratext *ouid = (oratext *) calloc (ouidl,sizeof(oratext)); okvAttrGetUniqueID(env, ttlv, &i, &ouid[0], &ouidl);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.54 okvAttrGetUniqueIDLen
okvAttrGetUniqueIDLen
gets the length of the unique identifier attribute.
Category
KMIP attribute API
Purpose
okvAttrGetUniqueIDLen
gets the unique identifier length in the
TTLV.
Syntax
ub4 okvAttrGetUniqueIDLen(OKVEnv *env, OKVTTLV *ttlv, ub4 *elem_index);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle. |
ttlv |
IN |
TTLV parent object containing the UID. |
elem_index |
IN/OUT |
The API will look for the first occurrence of the child with tag OKVDEF_TAG_ID from this index onwards and will store the actual index where the child was found.
|
Return Values
Return Value | Description |
---|---|
ub4 |
Length of the attribute value. Success: Positive integer indicating the length of UID. Failure: 0. |
Comments
None.
Example
ouidl = okvAttrGetUniqueIDLen(env, ttlv, &index); okvAttrGetUniqueID(env, ttlv, &index, &ouid[0], &ouidl);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.55 okvAttrGetUsageLimits
okvAttrGetUsageLimits
gets the usage limits attribute.
Category
KMIP attribute API
Purpose
okvAttrGetUsageLimits()
gets the usage limit attributed from the
OKVTTLV object.
Syntax
OKVErrNo okvAttrGetUsageLimits(OKVEnv *env, OKVTTLV *ttlv, ub8 *total, ub8 *count, ub4 *unit);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle. |
ttlv |
IN |
Oracle TTLV parent object. |
total |
OUT |
Usage limits total. |
count |
OUT |
Usage limits count. |
unit |
OUT |
Usage limits type. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success:
Failure: A valid error number is returned for the error on top of the error stack. |
Comments
None.
Example
ub4 utype; ub8 utotal, ucount; okvAttrGetUsageLimits(env, ttlv, &utotal, &ucount, &utype);
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.1.56 okvGetAttributeObject
okvGetAttributeObject
gets the attribute, its name, and
index from the parent attribute found at element index elem_index
.
Category
KMIP attribute API
Purpose
okvGetAttributeObject
gets the attribute, its name and index from
the parent attribute found at element index elem_index
. The actual
attribute value can be retrieved using one of the other functions defined in this
section.
Syntax
OKVErrNo okvGetAttributeObject(OKVEnv *env, OKVTTLV *ttlv, ub4 *elem_index, OKVAttrNo *attrno, ub4 *attr_index, OKVTTLV **attr);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Pointer to the Oracle Key Vault environment handle. |
ttlv |
IN |
Pointer to OKVTTLV object. |
elem_index |
IN/OUT |
The API will return the attribute number, attribute index and attribute value at the child at index pointed to by elem_index .
|
attrno |
OUT |
Oracle Key Vault attribute number. |
attr_index |
OUT |
Attribute index. |
attr |
OUT |
TTLV object containing attribute value. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failure: A valid error number is returned for the error on top of the error stack. |
Comments
This API is useful when it is required to parse the parent TTLV and find the various attribute and their corresponding values. The following example shows how we can use this API to parse a KMIP TTLV for name attribute.
Example
ub4 i = 0, ret_name_attrl, attrno, ret_index_name_attr; OKVTTLV *name_attr_out; oratext * ret_name_attr; while(OKV_ATTR_NOT_FOUND != okvGetAttributeObject(env, attr_out_list, &i, &attrno, &ret_index_name_attr, &name_attr_out)) { if(attrno == OKVAttrName) { ret_name_attrl = okvAttrGetNameValueLen(env, name_attr_out, &i); ret_name_attr = calloc(ret_name_attrl, sizeof(oratext)); okvAttrGetName(env, name_attr_out, &i, ret_name_attr, ret_name_attrl, &typ); break; } else { i++; } }
Related Topics
Parent topic: Oracle Key Vault KMIP Attributes APIs
11.2 Oracle Key Vault KMIP Custom Attribute APIs
The KMIP Custom Attribute APIs are listed in this section.
- About the KMIP Custom Attributes API
The Oracle Key Vault KMIP custom attributes follow a set of strict guidelines. - okvCustomAttrAddBoolean
okvCustomAttrAddBoolean
adds a Boolean data type to the custom attribute specified by the OKVTTLV parent object. - okvCustomAttrAddByteString
okvCustomAttrAddByteString
adds a byte string data type to the custom attribute specified by the OKVTTLV parent object. - okvCustomAttrAddDateTime
okvCustomAttrAddDateTime
adds a date time data type to the custom attribute specified by the OKVTTLV parent object. - okvCustomAttrAddEnum
okvCustomAttrAddEnum
adds an enumeration data type to the custom attribute specified by the OKVTTLV parent object. - okvCustomAttrAddInteger
okvCustomAttrAddInteger
adds an integer data type to the custom attribute specified by the OKVTTLV parent object. - okvCustomAttrAddInterval
okvCustomAttrAddInterval
adds an interval data type to the custom attribute specified by the OKVTTLV parent object. - okvCustomAttrAddLongInteger
okvCustomAttrAddLongInteger
adds a long integer data type to the custom attribute specified by the OKVTTLV parent object. - okvCustomAttrAddStructure
okvCustomAttrAddStructure
adds aTTLV
structure to the custom attribute specified by the OKVTTLV parent object. - okvCustomAttrAddTextString
okvCustomAttrAddTextString
adds a text string data type to the custom attribute specified by the OKVTTLV parent object. - okvCustomAttrGet
okvCustomAttrGet
finds any custom attribute at or after element indexelem_ind
. - okvCustomAttrGetBoolean
okvCustomAttrGetBoolean
fetches a Boolean data type found at the element indexelem_ind
. - okvCustomAttrGetByName
okvCustomAttrGetByName
finds custom attribute with namename
at or after the element indexelem_ind
. - okvCustomAttrGetByteString
okvCustomAttrGetByteString
returns the byte string data type found at the element indexelem_ind
. - okvCustomAttrGetByteStringLen
okvCustomAttrGetByteStringLen
returns the length of the byte string data type found at the element indexelem_ind
. - okvCustomAttrGetByType
okvCustomAttrGetByType
finds any custom attribute of typetyp
at or after the element indexelem_ind
, and returns the actual element index and length of the name of the custom attribute. - okvCustomAttrGetDateTime
okvCustomAttrGetDateTime
returns a date time data type found at the element indexelem_ind
. - okvCustomAttrGetEnum
okvCustomAttrGetEnum
returns an enumeration data type found at the element indexelem_ind
. - okvCustomAttrGetInteger
Returns an integer data type found at element indexelem_ind
in the custom attribute specified by the OKVTTLV parent object along with the attribute index. - okvCustomAttrGetInterval
okvCustomAttrGetInterval
returns an interval data type found at the element indexelem_ind
. - okvCustomAttrGetLongInteger
okvCustomAttrGetLongInteger
returns a long integer data type found at the element indexelem_ind
. - okvCustomAttrGetStructure
okvCustomAttrGetStructure
returns aTTLV
structure data type found at element indexelem_ind
. - okvCustomAttrGetTextString
okvCustomAttrGetTextString
returns the text string data type found at the element indexelem_ind
. - okvCustomAttrGetTextStringLen
okvCustomAttrGetTextStringLen
returns the length of the text string data type found at the element indexelem_ind
.
11.2.1 About the KMIP Custom Attributes API
The Oracle Key Vault KMIP custom attributes follow a set of strict guidelines.
The custom attributes can have structures but the structures cannot have structures within them.
All client KMIP custom attribute names can begin with x-
only. Any
Oracle Key Vault custom attribute not starting with this prefix will be rejected.
Functions that return the OKVTTLV
object have the following
interpretation:
-
On success, a valid
OKVTTLV
object for the attribute is returned. -
On failure, a
NULL
pointer is returned.
Functions that return the length of the retrieved object have the following interpretation:
-
On success, a length of the buffer is returned.
-
On failure, zero (0) is returned.
The following Oracle Key Vault functions add and retrieve custom attributes of a
specific KMIP Data type from the OKVTTLV
object. The functions have the
following construction in general:
-
okvCustomAttrAddType
adds the custom attribute name and value to theOKVTTLV
parent object. -
okvCustomAttrGetTypeLen
gets the length of the custom attribute value from theOKVTTLV
parent object for KMIP Data Types that don’t have fixed length. -
okvCustomAttrGetType
gets the custom attribute name and value from theOKVTTLV
parent object.
The attribute index and element index used in the Oracle Key Vault functions have the same meaning as the standard Oracle Key Vault KMIP attribute APIs, but with the following exception:
Custom attributes have iterator functions because the endpoint may not know the type of the custom attribute with a given name. This makes it necessary to iterate over all types of custom attributes. But when a custom attribute with a given name is located, then the element index points that attribute for certain. Therefore, the get functions for the custom attributes do not have to look for the attribute at all and do not have to update the element index passed in.
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.2 okvCustomAttrAddBoolean
okvCustomAttrAddBoolean
adds a Boolean data type to the
custom attribute specified by the OKVTTLV parent object.
Category
KMIP custom attributes API
Purpose
okvCustomAttrAddBoolean
adds a Boolean data type to the custom
attribute specified by the OKVTTLV parent object.
Syntax
OKVTTLV * okvCustomAttrAddBoolean(OKVEnv *env, OKVTTLV *ttlv, oratext *name, ub4 namel, ub8 bool_val, ub4 attr_index);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle |
ttlv |
IN |
TTLV parent object |
name |
IN |
Name of custom attribute |
namel |
IN |
Length of name of custom attribute |
bool_val |
IN |
Boolean value to be added to the custom attribute |
attr_index |
IN |
Attribute index of the Boolean custom attribute |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to the OKVTTLV object. Success: Pointer to OKVTTLV object with Boolean data type added. Failure: |
Comments
None.
Example
OKVTTLV *req = (OKVTTLV *) NULL; OKVTTLV *attr_in = (OKVTTLV *)NULL; ... req = okvEnvGetOpRequestObj(env); attr_in = okvCustomAttrAddBoolean(env, req, "x-My Boolean", strlen("x-My Boolean"), 00000001, 0); okvAddAttribute(env, uid, &attr_in);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.3 okvCustomAttrAddByteString
okvCustomAttrAddByteString
adds a byte string data type to
the custom attribute specified by the OKVTTLV parent object.
Category
KMIP custom attributes API
Purpose
okvCustomAttrAddByteString
adds a byte string data type to the
custom attribute specified by the OKVTTLV parent object.
Syntax
OKVTTLV *okvCustomAttrAddByteString(OKVEnv *env, OKVTTLV *ttlv, oratext *name, ub4 namel, ub1 *byte, ub4 bytel, ub4 attr_index);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle |
ttlv |
IN |
TTLV parent object |
name |
IN |
Name of custom attribute |
namel |
IN |
Length of name of custom attribute |
byte |
IN |
Byte string |
bytel |
IN |
Length of byte string |
attr_index |
IN |
Attribute index of the byte string custom attribute |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to the OKVTTLV object. Success: Pointer to OKVTTLV object with byte string added. Failure: |
Comments
None.
Example
OKVTTLV *req = (OKVTTLV *) NULL; OKVTTLV *attr_in = (OKVTTLV *)NULL; ub1 *byte = "ByteOne"; ... req = okvEnvGetOpRequestObj(env); attr_in = okvCustomAttrAddByteString(env, req, "x-My Byte String", strlen("x-My Byte String"), byte, strlen(byte), 0); okvAddAttribute(env, uid, &attr_in);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.4 okvCustomAttrAddDateTime
okvCustomAttrAddDateTime
adds a date time data type to the
custom attribute specified by the OKVTTLV parent object.
Category
KMIP custom attributes API
Purpose
okvCustomAttrAddDateTime
adds a date time data type to the custom
attribute specified by the OKVTTLV parent object.
Syntax
OKVTTLV * okvCustomAttrAddDateTime(OKVEnv *env, OKVTTLV *ttlv, oratext *name, ub4 namel, ub8 date_time, ub4 attr_index);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle |
ttlv |
IN |
TTLV parent object |
name |
IN |
Name of custom attribute |
namel |
IN |
Length of name of custom attribute |
date_time |
IN |
Date time value to be added to the custom attribute |
attr_index |
IN |
Attribute index of the date time custom attribute |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to the OKVTTLV object. Success: Pointer to OKVTTLV object with date time custom attribute added. Failure: |
Comments
None.
Example
OKVTTLV *req = (OKVTTLV *) NULL; OKVTTLV *attr_in = (OKVTTLV *)NULL; time_t current_time = time((time_t *)NULL); ... req = okvEnvGetOpRequestObj(env); attr_in = okvCustomAttrAddDateTime(env, req, "x-My Date Time", strlen("x-My Date Time"), (ub8) current_time, 0); okvAddAttribute(env, uid, &attr_in);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.5 okvCustomAttrAddEnum
okvCustomAttrAddEnum
adds an enumeration data type to the
custom attribute specified by the OKVTTLV parent object.
Category
KMIP custom attributes API
Purpose
okvCustomAttrAddEnum
adds an enumeration data type to the custom
attribute specified by the OKVTTLV parent object.
Syntax
OKVTTLV * okvCustomAttrAddEnum(OKVEnv *env, OKVTTLV *ttlv, oratext *name, ub4 namel, ub4 enumval, ub4 attr_index);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle |
ttlv |
IN |
TTLV parent object |
name |
IN |
Name of custom attribute |
namel |
IN |
Length of name of custom attribute |
enumval |
IN |
Enum value to be added to the custom attribute |
attr_index |
IN |
Attribute index of enumeration custom attribute |
Return Values
Return Value | Description |
---|---|
OKVTTLV
* |
Pointer to the OKVTTLV object. Success: Pointer to OKVTTLV object with enumeration values added. Failure:
|
Comments
None.
Example
OKVTTLV *req = (OKVTTLV *) NULL; OKVTTLV *attr_in = (OKVTTLV *)NULL; ... req = okvEnvGetOpRequestObj(env); attr_in = okvCustomAttrAddEnum(env, req, "x-My Enumeration", strlen("x-My Enumeration"), CRYPTO_ALG_DES, 0); okvAddAttribute(env, uid, &attr_in);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.6 okvCustomAttrAddInteger
okvCustomAttrAddInteger
adds an integer data type to the
custom attribute specified by the OKVTTLV parent object.
Category
KMIP custom attributes API
Purpose
okvCustomAttrAddInteger
adds an integer data type to the custom
attribute specified by the OKVTTLV parent object.
Syntax
OKVTTLV * okvCustomAttrAddInteger(OKVEnv *env, OKVTTLV *ttlv, oratext *name, ub4 namel, ub4 integer, ub4 attr_index);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle |
ttlv |
IN |
TTLV parent object |
name |
IN |
Name of custom attribute |
namel |
IN |
Length of name of custom attribute |
integer |
IN |
Integer value to be added to the custom attribute |
attr_ind |
IN |
Attribute index of the integer custom attribute |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to the OKVTTLV object. Success: Pointer to OKVTTLV object with integer data type added. Failure: |
Comments
None.
Example
OKVTTLV *req = (OKVTTLV *) NULL; OKVTTLV *attr_in = (OKVTTLV *)NULL; ... req = okvEnvGetOpRequestObj(env); attr_in = okvCustomAttrAddInteger(env, req, "x-My Integer", strlen("x-My Integer"), 32, 0); okvAddAttribute(env, uid, &attr_in);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.7 okvCustomAttrAddInterval
okvCustomAttrAddInterval
adds an interval data type to the
custom attribute specified by the OKVTTLV parent object.
Category
KMIP custom attributes API
Purpose
okvCustomAttrAddInterval
adds an interval data type to the custom
attribute specified by the OKVTTLV parent object.
Syntax
OKVTTLV * okvCustomAttrAddInterval(OKVEnv *env, OKVTTLV *ttlv, oratext *name, ub4 namel, ub4 interval, ub4 attr_index);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle |
ttlv |
IN |
TTLV parent object |
name |
IN |
Name of custom attribute |
namel |
IN |
Length of name of custom attribute |
interval |
IN |
Interval value to be added to the custom attribute |
attr_ind |
IN |
Attribute index of the Interval custom attribute |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to the OKVTTLV object. Success: Pointer to OKVTTLV object with interval data type added. Failure: |
Comments
None.
Example
OKVTTLV *req = (OKVTTLV *) NULL; OKVTTLV *attr_in = (OKVTTLV *)NULL; ... req = okvEnvGetOpRequestObj(env); attr_in = okvCustomAttrAddInterval(env, req, "x-My Interval", strlen("x-My Interval"), 5, 0); okvAddAttribute(env, uid, &attr_in);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.8 okvCustomAttrAddLongInteger
okvCustomAttrAddLongInteger
adds a long integer data type to
the custom attribute specified by the OKVTTLV parent object.
Category
KMIP custom attributes API
Purpose
okvCustomAttrAddLongInteger
adds a long integer data type to the
custom attribute specified by the OKVTTLV parent object.
Syntax
OKVTTLV * okvCustomAttrAddLongInteger(OKVEnv *env, OKVTTLV *ttlv, oratext *name, ub4 namel, ub8 long_integer, ub4 attr_index);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle. |
ttlv |
IN |
TTLV parent object. |
name |
IN |
Name of custom attribute. |
namel |
IN |
Length of name of custom attribute. |
long_integer |
IN |
Long integer value to be added to the custom attribute. |
attr_index |
IN |
Attribute index of long integer custom attribute. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to the OKVTTLV object. Success: Pointer to OKVTTLV object with long integer data type added. Failure: |
Comments
None.
Example
OKVTTLV *req = (OKVTTLV *) NULL; OKVTTLV *attr_in = (OKVTTLV *)NULL; ... req = okvEnvGetOpRequestObj(env); attr_in = okvCustomAttrAddLongInteger(env, req, "x-My Long Integer", strlen("x-My Long Integer"), (ub8) 32, 0); okvAddAttribute(env, uid, &attr_in);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.9 okvCustomAttrAddStructure
okvCustomAttrAddStructure
adds a TTLV
structure to the custom attribute specified by the OKVTTLV parent object.
Category
KMIP custom attributes API
Purpose
okvCustomAttrAddStructure
adds a TTLV structure to the custom
attribute specified by the OKVTTLV parent object.
Syntax
OKVTTLV * okvCustomAttrAddStructure(OKVEnv *env, OKVTTLV *ttlv, oratext *name, ub4 namel, OKVTTLV *structure, ub4 attr_index);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle. |
ttlv |
IN |
TTLV parent object. |
name |
IN |
Name of custom attribute. |
namel |
IN |
Length of name of custom attribute. |
structure |
IN |
TTLV structure to be added to the custom attribute. |
attr_index |
IN |
Attribute index of the structure custom attribute. |
Return Values
Return Value | Description |
---|---|
OKVTTLV * |
Pointer to the OKVTTLV object. Success: Pointer to OKVTTLV object with TTLV structure added. Failure: |
Comments
None.
Example
OKVTTLV *req = (OKVTTLV *) NULL; OKVTTLV *attr_in = (OKVTTLV *)NULL; ... /* Construct the structure to be added */ OKVTTLV *req2 = okvEnvGetOpRequestObj(env); okvAttrAddUniqueID(env, req2, "Unique_ID354", sizeof("Unique_ID354")); /* Add the structure */ req = okvEnvGetOpRequestObj(env); attr_in = okvCustomAttrAddStructure(env, req, "x-My Structure", strlen("x-My Structure"), req2, 0); okvAddAttribute(env, uid, &attr_in);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.10 okvCustomAttrAddTextString
okvCustomAttrAddTextString
adds a text string data type to
the custom attribute specified by the OKVTTLV parent object.
Category
KMIP custom attributes API
Purpose
okvCustomAttrAddTextString
adds a text string data type to the
custom attribute specified by the OKVTTLV parent object.
Syntax
OKVTTLV *okvCustomAttrAddTextString(OKVEnv *env, OKVTTLV *ttlv, oratext *name, ub4 namel, oratext *text, ub4 textl, ub4 attr_index);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle. |
ttlv |
IN |
TTLV parent object. |
name |
IN |
Name of custom attribute. |
namel |
IN |
Length of name of custom attribute. |
text |
IN |
Text string. |
textl |
IN |
Length of text string. |
attr_index |
IN |
Attribute index of the text string custom attribute. |
Return Values
Return Value | Description |
---|---|
OKVTTLV
* |
Pointer to the OKVTTLV object. Success: Pointer to OKVTTLV object with text string data type added. Failure:
|
Comments
None.
Example
OKVTTLV *req = (OKVTTLV *) NULL; OKVTTLV *attr_in = (OKVTTLV *)NULL; oratext *text = "Text Message"; ... req = okvEnvGetOpRequestObj(env); attr_in = okvCustomAttrAddTextString(env, req, "x-My Text String", strlen("x-My Text String"), text, strlen(text), 0); okvAddAttribute(env, uid, &attr_in);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.11 okvCustomAttrGet
okvCustomAttrGet
finds any custom attribute at or after
element index elem_ind
.
Category
KMIP custom attributes API
Purpose
okvCustomAttrGet
finds any custom attribute at or after element
index elem_ind
. The actual element index and length of the name of
the custom attribute are also returned.
Syntax
OKVErrNo okvCustomAttrGet(OKVEnv *env, OKVTTLV *ttlv, ub4 *elem_ind, OKVType *typ, ub4 *name_len);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle. |
ttlv |
IN |
TTLV parent object. |
elem_ind |
IN/OUT |
Element index. |
typ |
IN |
Type of the custom attribute. |
name_len |
OUT |
Length of the name of the custom attribute. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success:
Failure: A valid error number is returned for the error on top of the error stack. |
Comments
None.
Example
OKVTTLV *ttlv = (OKVTTLV *) NULL; oratext *attr_name_list[1]; attr_name_list[0] = "x-My Custom Attribute"; ub4 elem_ind = 0; ub1 typ = 0; ub4 name_len = 0; ... okvGetAttributes(env, uid, 1, (oratext **) attr_name_list, &ttlv); /* We need the type of the custom attribute */ okvCustomAttrGetByName(env, ttlv, &elem_ind, attr_name_list[0], strlen((char *) attr_name_list[0]), &typ); okvCustomAttrGet(env, ttlv, &elem_ind, &typ, &name_len); printf ("%d %d", elem_ind, name_len);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.12 okvCustomAttrGetBoolean
okvCustomAttrGetBoolean
fetches a Boolean data type found at
the element index elem_ind
.
Category
KMIP custom attributes API
Purpose
okvCustomAttrGetBoolean
fetches a Boolean data type found at element
index elem_ind
in the custom attribute specified by
the OKVTTLV parent object along with the attribute index.
Syntax
OKVErrNo okvCustomAttrGetBoolean(OKVEnv *env, OKVTTLV *ttlv, ub4 elem_ind, oratext *name, ub4 *namel, ub8 *bool_val, ub4 *attr_index);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle. |
ttlv |
IN |
TTLV parent object. |
elem_ind |
IN |
Element index. |
name |
OUT |
Name of custom attribute. |
namel |
IN/OUT |
Length of name of custom attribute. |
bool_val |
OUT |
Boolean value in the custom attribute at |
attr_index |
OUT |
Attribute index of the Boolean custom attribute. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success:
Failure: A valid error number is returned for the error on top of the error stack. |
Comments
Either memory for the buffer for the name of the custom attribute should be pre-allocated and the size of memory passed in as namel
, or both name
and namel
should be NULL
. Just one of them cannot be NULL
.
Example
OKVTTLV *ttlv = (OKVTTLV *) NULL; oratext *attr_name_list[1]; attr_name_list[0] = "x-My Boolean"; ub4 attr_index = 0; ub4 elem_ind = 0; ub8 bool_val = 0; ub4 namel = 20; ... okvGetAttributes(env, uid, 1, (oratext **) attr_name_list, &ttlv); oratext *name = (oratext *) malloc(namel * (sizeof(oratext))); memset((void *) name, 0, namel); okvCustomAttrGetBoolean(env, ttlv, elem_ind, name, &namel, &bool_val, &attr_index); printf ("%d", bool_val); ... free(name);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.13 okvCustomAttrGetByName
okvCustomAttrGetByName
finds custom attribute with
name name
at or after the element
index elem_ind
.
Category
KMIP custom attributes API
Purpose
okvCustomAttrGetByName
finds custom attribute with name
name
at or after element index
elem_ind
. The actual element
index and type of the custom attribute are also
returned.
Syntax
OKVErrNo okvCustomAttrGetByName(OKVEnv *env, OKVTTLV *ttlv, ub4 *elem_ind, oratext *name, ub4 name_len, OKVType *typ);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle |
ttlv |
IN |
TTLV parent object |
elem_ind |
IN/OUT |
Element index |
name |
IN |
Name of custom attribute |
name_len |
IN |
Length of name of custom attribute |
typ |
OUT |
Type of the custom attribute |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success:
Failure: A valid error number is returned for the error on top of the error stack. |
Comments
None.
Example
OKVTTLV *ttlv = (OKVTTLV *) NULL; oratext *attr_name_list[1]; attr_name_list[0] = "x-My Custom Attribute"; ub4 elem_ind = 0; ub1 typ = 0; ... okvGetAttributes(env, uid, 1, (oratext **) attr_name_list, &ttlv); okvCustomAttrGetByName(env, ttlv, &elem_ind, attr_name_list[0], strlen((char *) attr_name_list[0]), &typ); printf ("%d %d", elem_ind, typ);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.14 okvCustomAttrGetByteString
okvCustomAttrGetByteString
returns the byte string data
type found at the element index elem_ind
.
Category
KMIP custom attributes API
Purpose
okvCustomAttrGetByteString
returns the byte string data type found
at element index elem_ind
in the custom attribute
specified by the OKVTTLV parent object along with the attribute
index.
Syntax
OKVErrNo okvCustomAttrGetByteString(OKVEnv *env, OKVTTLV *ttlv, ub4 elem_ind, oratext *name, ub4 *namel, ub1 *byte, ub4 *bytel, ub4 *attr_index);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle. |
ttlv |
IN |
TTLV parent object. |
elem_ind |
IN |
Element index. |
name |
OUT |
Name of custom attribute. |
namel |
IN/OUT |
Length of name of custom attribute. |
byte |
OUT |
Byte string. |
bytel |
IN/OUT |
Length of byte string. |
attr_index |
OUT |
Attribute index of the byte string custom attribute. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success:
Failure: A valid error number is returned for the error on top of the error stack. |
Comments
Memory for the buffer for the byte string data type should be pre-allocated and the size of memory passed in as bytel
.
Either memory for the buffer for the name of the custom attribute should be pre-allocated and the size of memory passed in as namel
, or both name
and namel
should be NULL
. Just one of them cannot be NULL
.
Example
OKVTTLV *ttlv = (OKVTTLV *) NULL; oratext *attr_name_list[1]; attr_name_list[0] = "x-My Byte String"; ub4 attr_index = 0; ub4 elem_ind = 0; ub4 bytel = 16; ub4 namel = 20; ... okvGetAttributes(env, uid, 1, (oratext **) attr_name_list, &ttlv); ub1 *byte = (ub1 *) malloc(bytel * (sizeof(ub1))); memset((void *) byte, 0, bytel); oratext *name = (oratext *) malloc(namel * (sizeof(oratext))); memset((void *) name, 0, namel); okvCustomAttrGetByteString(env, ttlv, elem_ind, name, &namel, byte, &bytel, &attr_index); printf ("%s", byte); ... free(name); free(byte);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.15 okvCustomAttrGetByteStringLen
okvCustomAttrGetByteStringLen
returns the length of the
byte string data type found at the element index elem_ind
.
Category
KMIP custom attributes API
Purpose
okvCustomAttrGetByteStringLen
returns the length of the byte string
data type found at element index elem_ind
in the custom attribute
specified by the OKVTTLV parent object.
Syntax
ub4 okvCustomAttrGetByteStringLen(OKVEnv *env, OKVTTLV *ttlv, ub4 elem_ind);
Parameters
Parameters | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle. |
ttlv |
IN |
TTLV parent object. |
elem_ind |
IN |
Element index. |
Return Values
Return Value | Description |
---|---|
ub4 |
Length of the attribute value. Success: Length of the byte string data type. Failure: |
Comments
None.
Example
OKVTTLV *attrs = (OKVTTLV *)NULL; oratext *attr_name_list[1]; attr_name_list[0] = "x-My Byte String"; ub4 len = 0, elem_ind = 0; ... okvGetAttributes(env, uid, 1, (oratext **) attr_name_list, &attrs); len = okvCustomAttrGetByteStringLen(env, attrs, elem_ind);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.16 okvCustomAttrGetByType
okvCustomAttrGetByType
finds any custom attribute of
type typ
at or after the element index elem_ind
, and
returns the actual element index and length of the name of the custom attribute.
Category
KMIP custom attributes API
Purpose
okvCustomAttrGetByType
finds any custom attribute of type typ at or after element index elem_ind
. The actual element index and length of the name of the custom attribute are also returned.
Syntax
OKVErrNo okvCustomAttrGetByType(OKVEnv *env, OKVTTLV *ttlv, ub4 *elem_ind, OKVType typ, ub4 *name_len);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle |
ttlv |
IN |
TTLV parent object |
elem_ind |
IN/OUT |
Element index |
typ |
IN |
Type of the custom attribute |
name_len |
OUT |
Length of the name of the custom attribute |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success:
Failure: A valid error number is returned for the error on top of the error stack. |
Comments
None.
Example
OKVTTLV *ttlv = (OKVTTLV *) NULL; oratext *attr_name_list[1]; attr_name_list[0] = "x-My Custom Attribute"; ub4 elem_ind = 0; ub1 typ = 0; ub4 name_len = 0; ... okvGetAttributes(env, uid, 1, (oratext **) attr_name_list, &ttlv); /* We need the type of the custom attribute */ okvCustomAttrGetByName(env, ttlv, &elem_ind, attr_name_list[0], strlen((char *) attr_name_list[0]), &typ); okvCustomAttrGetByType(env, ttlv, &elem_ind, typ, &name_len); printf ("%d %d", elem_ind, name_len);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.17 okvCustomAttrGetDateTime
okvCustomAttrGetDateTime
returns a date time data type
found at the element index elem_ind
.
Category
KMIP custom attributes API
Purpose
okvCustomAttrGetDateTime
returns a date time data type found at
element index elem_ind
in the custom attribute
specified by the OKVTTLV parent object along with the attribute
index.
Syntax
OKVErrNo okvCustomAttrGetDateTime(OKVEnv *env, OKVTTLV *ttlv, ub4 elem_ind, oratext *name, ub4 *namel, ub8 *date_time, ub4 *attr_index);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle. |
ttlv |
IN |
TTLV parent object. |
elem_ind |
IN |
Element index. |
name |
OUT |
Name of custom attribute. |
namel |
IN/OUT |
Length of name of custom attribute. |
date_time |
OUT |
Date-time value in the custom attribute at element index
|
attr_index |
OUT |
Attribute index of the date-time custom attribute. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success:
Failure: A valid error number is returned for the error on top of the error stack. |
Comments
Either memory for the buffer for the name of the custom attribute should be pre-allocated and the size of memory passed in as namel
, or both name
and namel
should be NULL
. Just one of them cannot be NULL
.
Example
OKVTTLV *ttlv = (OKVTTLV *) NULL; oratext *attr_name_list[1]; attr_name_list[0] = "x-My Date Time"; ub4 attr_index = 0; ub4 elem_ind = 0; ub8 date_time = 0; ub4 namel = 20; ... okvGetAttributes(env, uid, 1, (oratext **) attr_name_list, &ttlv); oratext *name = (oratext *) malloc(namel * (sizeof(oratext))); memset((void *) name, 0, namel); okvCustomAttrGetDateTime(env, ttlv, elem_ind, name, &namel, &date_time, &attr_index); printf ("%d", date_time); ... free(name);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.18 okvCustomAttrGetEnum
okvCustomAttrGetEnum
returns an enumeration data type found
at the element index elem_ind
.
Category
KMIP custom attributes API
Purpose
okvCustomAttrGetEnum
returns an enumeration data type found at
element index elem_ind
in the custom attribute
specified by the OKVTTLV parent object along with the attribute
index.
Syntax
OKVErrNo okvCustomAttrGetEnum(OKVEnv *env, OKVTTLV *ttlv, ub4 elem_ind, oratext *name, ub4 *namel, ub4 *enumval, ub4 *attr_index);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle. |
ttlv |
IN |
TTLV parent object. |
elem_ind |
IN |
Element index. |
name |
OUT |
Name of custom attribute. |
namel |
IN/OUT |
Length of name of custom attribute. |
enumval |
OUT |
|
attr_index |
OUT |
Attribute index of enumeration custom attribute. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success:
Failure: A valid error number is returned for the error on top of the error stack. |
Comments
Either memory for the buffer for the name of the custom attribute should be pre-allocated and the size of memory passed in as namel
, or both name
and namel
should be NULL
. Just one of them cannot be NULL
.
Example
OKVTTLV *ttlv = (OKVTTLV *) NULL; oratext *attr_name_list[1]; attr_name_list[0] = "x-My Enumeration"; ub4 attr_index = 0; ub4 elem_ind = 0; ub4 enumval = 0; ub4 namel = 20; ... okvGetAttributes(env, uid, 1, (oratext **) attr_name_list, &ttlv); oratext *name = (oratext *) malloc(namel * (sizeof(oratext))); memset((void *) name, 0, namel); okvCustomAttrGetEnum(env, ttlv, elem_ind, name, &namel, &enumval, &attr_index); printf ("%d", enumval); ... free(name);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.19 okvCustomAttrGetInteger
Returns an integer data type found at element index elem_ind
in the custom attribute specified by the OKVTTLV parent object along with the attribute
index.
Catetory
KMIP Custom Attributes API
Purpose
Returns an integer data type found at element index
elem_ind
in the custom attribute specified by the OKVTTLV
parent object along with the attribute index.
Syntax
OKVErrNo okvCustomAttrGetInteger(OKVEnv *env, OKVTTLV *ttlv, ub4 elem_ind, oratext *name, ub4 *namel, ub4 *integer, ub4 *attr_index);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
|
Oracle Key Vault environment handle. |
ttlv |
IN |
TTLV parent object. |
elem_ind |
IN |
Element index. |
name |
OUT |
Name of the custom attribute. |
namel |
IN/OUT |
Length of the name of the custom attribute. |
integer |
OUT |
Integer value in the custom attribute at
elem_ind .
|
attr_index |
OUT |
Attribute index of the integer custom attribute. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failure: A valid error number is returned for the error on top of the error stack. |
Comments
Either memory for the buffer for the name of the custom attribute should
be pre-allocated and the size of memory passed in as namel
, or both
name
and namel
should be
NULL
.
Example
OKVTTLV *ttlv = (OKVTTLV *) NULL; oratext *attr_name_list[1]; attr_name_list[0] = "x-My Integer"; ub4 attr_index = 0; ub4 elem_ind = 0; ub4 integer = 0; ub4 namel = 20; ... okvGetAttributes(env, uid, 1, (oratext **) attr_name_list, &ttlv); oratext *name = (oratext *) malloc(namel * (sizeof(oratext))); memset((void *) name, 0, namel); okvCustomAttrGetInteger(env, ttlv, elem_ind, name, &namel, &integer, &attr_index); printf ("%d", integer); ... free(name);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.20 okvCustomAttrGetInterval
okvCustomAttrGetInterval
returns an interval data type found
at the element index elem_ind
.
Category
KMIP custom attributes API
Purpose
okvCustomAttrGetInterval
returns an interval data type found at
element index elem_ind
in the custom attribute specified by the OKVTTLV
parent object along with the attribute index.
Syntax
OKVErrNo okvCustomAttrGetInterval(OKVEnv *env, OKVTTLV *ttlv, ub4 elem_ind, oratext *name, ub4 *namel, ub4 *interval, ub4 *attr_index);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle. |
ttlv |
IN |
TTLV parent object. |
elem_ind |
IN |
Element index. |
name |
OUT |
Name of custom attribute. |
namel |
IN/OUT |
Length of name of custom attribute. |
interval |
OUT |
Interval value in the custom attribute at element index
|
attr_index |
OUT |
Attribute index of the Interval custom attribute. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success:
Failure: A valid error number is returned for the error on top of the error stack. |
Comments
Either memory for the buffer for the name of the custom attribute should be pre-allocated and the size of memory passed in as namel
, or both name
and namel
should be NULL
. Just one of them cannot be NULL
.
Example
OKVTTLV *ttlv = (OKVTTLV *) NULL; oratext *attr_name_list[1]; attr_name_list[0] = "x-My Interval"; ub4 attr_index = 0; ub4 elem_ind = 0; ub4 interval = 0; ub4 namel = 20; ... okvGetAttributes(env, uid, 1, (oratext **) attr_name_list, &ttlv); oratext *name = (oratext *) malloc(namel * (sizeof(oratext))); memset((void *) name, 0, namel); okvCustomAttrGetInterval(env, ttlv, elem_ind, name, &namel, &interval, &attr_index); printf ("%d", interval); ... free(name);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.21 okvCustomAttrGetLongInteger
okvCustomAttrGetLongInteger
returns a long integer data type
found at the element index elem_ind
.
Category
KMIP custom attributes API
Purpose
okvCustomAttrGetLongInteger
returns a long integer data type found
at element index elem_ind
in the custom attribute specified by the
OKVTTLV parent object along with the attribute index.
Syntax
OKVErrNo okvCustomAttrGetLongInteger(OKVEnv *env, OKVTTLV *ttlv, ub4 elem_ind, oratext *name, ub4 *namel, ub8 *long_integer, ub4 *attr_index);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle. |
ttlv |
IN |
TTLV parent object. |
elem_ind |
IN |
Element index. |
name |
OUT |
Name of custom attribute. |
namel |
IN/OUT |
Length of name of custom attribute. |
long_integer |
OUT |
Long integer value in the custom attribute at element index
|
attr_index |
OUT |
Attribute index of the long integer custom attribute. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failure: A valid error number is returned for the error on top of the error stack. |
Comments
Either memory for the buffer for the name of the custom attribute should be pre-allocated and the size of memory passed in as namel
, or both name
and namel
should be NULL
. Just one of them cannot be NULL
.
Example
OKVTTLV *ttlv = (OKVTTLV *) NULL; oratext *attr_name_list[1]; attr_name_list[0] = "x-My Long Integer"; ub4 attr_index = 0; ub4 elem_ind = 0; ub8 long_integer = 0; ub4 namel = 20; ... okvGetAttributes(env, uid, 1, (oratext **) attr_name_list, &ttlv); oratext *name = (oratext *) malloc(namel * (sizeof(oratext))); memset((void *) name, 0, namel); okvCustomAttrGetLongInteger(env, ttlv, elem_ind, name, &namel, &long_integer, &attr_index); printf ("%ld", long_integer); ... free(name);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.22 okvCustomAttrGetStructure
okvCustomAttrGetStructure
returns a TTLV
structure data type found at element index elem_ind
.
Category
KMIP custom attributes API
Purpose
okvCustomAttrGetStructure
returns a TTLV structure data type found
at element index elem_ind
in the custom attribute
specified by the OKVTTLV parent object along with the attribute
index.
Syntax
OKVErrNo okvCustomAttrGetStructure(OKVEnv *env, OKVTTLV *ttlv, ub4 elem_ind, oratext *name, ub4 *namel, OKVTTLV **structure, ub4 *attr_index);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle |
ttlv |
IN |
TTLV parent object |
elem_ind |
IN |
Element index |
name |
OUT |
Name of custom attribute |
namel |
IN/OUT |
Length of name of custom attribute |
structure |
OUT |
TTLV structure of the custom attribute |
attr_index |
OUT |
Attribute index of the structure custom attribute |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success:
Failure: A valid error number is returned for the error on top of the error stack. |
Comments
Either memory for the buffer for the name of the custom attribute should be pre-allocated and the size of memory passed in as namel
, or both name
and namel
should be NULL
. Just one of them cannot be NULL
.
Example
OKVTTLV *ttlv = (OKVTTLV *) NULL; oratext *attr_name_list[1]; attr_name_list[0] = "x-My Structure"; ub4 attr_index = 0; ub4 elem_ind = 0; OKVTTLV *structure = (OKVTTLV *) NULL; ub4 namel = 20; ... /* Retrieve the structure */ okvGetAttributes(env, uid, 1, (oratext **) attr_name_list, &ttlv); oratext *name = (oratext *) malloc(namel * (sizeof(oratext))); memset((void *) name, 0, namel); okvCustomAttrGetStructure(env, ttlv, elem_ind, name, &namel, &structure, &attr_index); /* Parse the retrieved structure */ ub4 len = 0; OKVTTLV *cttlv = okvTTLVGetChild(env, structure, 0, (OKVTag *) 0, (OKVType *) 0, &len); oratext *cttlv_val = (oratext *)okvTTLVGetValue(cttlv); printf ("%s", cttlv_val); ... free(name);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.23 okvCustomAttrGetTextString
okvCustomAttrGetTextString
returns the text string data type
found at the element index elem_ind
.
Category
KMIP custom attributes API
Purpose
okvCustomAttrGetTextString
returns the text string data type found
at element index elem_ind
in the custom attribute specified by the
OKVTTLV parent object along with the attribute index.
Syntax
OKVErrNo okvCustomAttrGetTextString(OKVEnv *env, OKVTTLV *ttlv, ub4 elem_ind, oratext *name, ub4 *namel, oratext *text, ub4 *textl, ub4 *attr_index);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle |
ttlv |
IN |
TTLV parent object |
elem_ind |
IN |
Element index. |
name |
OUT |
Name of the custom attribute. |
namel |
IN/OUT |
Length of the name of the custom attribute. |
text |
OUT |
Text string. |
textl |
IN/OUT |
Length of the text string. |
attr_index |
OUT |
Attribute index of text string custom attribute. |
Return Values
Return Value | Description |
---|---|
OKVErrNo |
Oracle Key Vault error number. Success: OKV_SUCCESS (0) is returned. Failure: A valid error number is returned for the error on top of the error stack. |
Comments
Memory for the buffer for the text string data type should be pre-allocated and the
size of memory passed in as textl
.
Either memory for the buffer for the name of the custom attribute should be
pre-allocated and the size of memory passed in as namel
, or both
name
and namel
should be NULL.
Example
OKVTTLV *ttlv = (OKVTTLV *) NULL; oratext *attr_name_list[1]; attr_name_list[0] = "x-My Text String"; ub4 attr_index = 0; ub4 elem_ind = 0; ub4 textl = 16; ub4 namel = 20; ... okvGetAttributes(env, uid, 1, (oratext **) attr_name_list, &ttlv); oratext *text = (oratext *) malloc(textl * (sizeof(oratext))); memset((void *) text, 0 , textl); oratext *name = (oratext *) malloc(namel * (sizeof(oratext))); memset((void *) name, 0, namel); okvCustomAttrGetTextString(env, ttlv, elem_ind, name, &namel, text, &textl, &attr_index); printf ("%s", text); ... free(name); free(text);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs
11.2.24 okvCustomAttrGetTextStringLen
okvCustomAttrGetTextStringLen
returns the length of the text
string data type found at the element index elem_ind
.
Category
KMIP custom attributes API
Purpose
okvCustomAttrGetTextStringLen
returns the length of the text string
data type found at element index elem_ind
in the custom attribute
specified by the OKVTTLV parent object.
Syntax
ub4 okvCustomAttrGetTextStringLen(OKVEnv *env, OKVTTLV *ttlv, ub4 elem_ind);
Parameters
Parameter | IN/OUT | Description |
---|---|---|
env |
IN |
Oracle Key Vault environment handle |
ttlv |
IN |
TTLV parent object |
elem_ind |
IN |
Element index |
Return Values
Return Value | Description |
---|---|
ub4 |
Length of the attribute value. Success: Length of the text string data type attribute value. Failure: |
Comments
None.
Example
OKVTTLV *attrs = (OKVTTLV *)NULL; oratext *attr_name_list[1]; attr_name_list[0] = "x-My Text String"; ub4 len = 0, elem_ind = 0; ... okvGetAttributes(env, uid, 1, (oratext **) attr_name_list, &attrs); len = okvCustomAttrGetTextStringLen(env, attrs, elem_ind);
Related Topics
Parent topic: Oracle Key Vault KMIP Custom Attribute APIs