12 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 Client SDK KMIP Attribute APIs
Oracle Key Vault client SDK provides a set of APIs to manage KMIP attributes. - Oracle Key Vault Client SDK KMIP Custom Attribute APIs
The KMIP Custom Attribute APIs are listed in this section.
Parent topic: Oracle Key Vault Client C SDK API Reference
12.1 Oracle Key Vault Client SDK KMIP Attribute APIs
Oracle Key Vault client SDK 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. - okvAttrAddArchiveDate
okvAttrAddArchiveDateadds an archive date attribute to an OKVTTLV object. - okvAddAttributeObject
okvAddAttributeObjectadds an attribute object to the parentTTLVobject. - okvAttrAddActivationDate
okvAttrAddActivationDateadds the activation date attribute to an OKVTTLV object. - okvAttrAddCertLen
okvAttrAddCertLenadds a certificate length attribute to an OKVTTLV object. - okvAttrAddCertType
okvAttrAddCertTypeadds a certificate type attribute to an OKVTTLV object. - okvAttrAddCompromiseDate
okvAttrAddCompromiseDateadds a compromise date attribute to an OKVTTLV object. - okvAttrAddCompromiseOccurrenceDate
okvAttrAddCompromiseOccurrenceDateadds a compromise occurrence date attribute to an OKVTTLV object. - okvAttrAddContactInfo
okvAttrAddContactInfoadds a contact information attribute to an OKVTTLV object. - okvAttrAddCryptoAlgo
okvAttrAddCryptoAlgoadds a cryptographic algorithm attribute to an OKVTTLV object. - okvAttrAddCryptoLen
okvAttrAddCryptoLenadds a cryptographic length attribute to an OKVTTLV object. - okvAttrAddCryptoParams
okvAttrAddCryptoParamsadds cryptographic parameters to an OKVTTLV object. - okvAttrAddCryptoUsageMask
okvAttrAddCryptoUsageMaskadds a cryptographic usage mask attribute to an OKVTTLV object. - okvAttrAddDeactivationDate
okvAttrAddDeactivationDateadds a deactivation date attribute to an OKVTTLV object. - okvAttrAddDestroyDate
okvAttrAddDestroyDateadds a destroy date attribute to an OKVTTLV object. - okvAttrAddDigest
okvAttrAddDigestadds a digest attribute to an OKVTTLV object. - okvAttrAddDigitalSignAlgo
okvAttrAddDigitalSignAlgoadds a digital signature algorithm attribute to an OKVTTLV object. - okvAttrAddExtractable
okvAttrAddExtractableadds an extractable attribute to an OKVTTLV object. - okvAttrAddFresh
okvAttrAddFreshadds a fresh attribute to an OKVTTLV object. - okvAttrAddInitialDate
okvAttrAddInitialDateadds an initial date attribute to an OKVTTLV object. - okvAttrAddLastChangeDate
okvAttrAddLastChangeDateadds a last change date attribute to an OKVTTLV object. - okvAttrAddLeaseTime
okvAttrAddLeaseTimeadds a lease time attribute to an OKVTTLV object. - okvAttrAddName
okvAttrAddNameadds a name attribute to an OKVTTLV object. - okvAttrAddNeverExtractable
okvAttrAddNeverExtractableadds a never extractable attribute to an OKVTTLV object. - okvAttrAddObjectGroup
okvAttrAddObjectGroupadds an object group attribute to an OKVTTLV object. - okvAttrAddObjectType
okvAttrAddObjectTypeadds an object type attribute to an OKVTTLV object. - okvAttrAddProcessStartDate
okvAttrAddProcessStartDateadds a process start date attribute to an OKVTTLV object. - okvAttrAddProtectStopDate
okvAttrAddProtectStopDateadds a protect stop date attribute to an OKVTTLV object. - okvAttrAddRevocationReason
okvAttrAddRevocationReasonadds the revocation reason attribute to an OKVTTLV object. - okvAttrAddState
okvAttrAddStateadds a state attribute to an OKVTTLV object. - okvAttrAddUniqueID
okvAttrAddUniqueIDadds a unique identifier attribute to an OKVTTLV object. - okvAttrAddUsageLimits
okvAttrAddUsageLimitsadds a usage limits attribute to an OKVTTLV object. - okvAttrAddX509CertId
okvAttrAddX509CertIdadds an issuer and serial number which forms the X.509 Certificate ID attribute to an OKVTTLV object. - okvAttrAddX509CertIss
okvAttrAddX509CertIssadds a X.509 Certificate Issuer distinguished name attribute to an OKVTTLV object. - okvAttrAddX509CertIssAltName
okvAttrAddX509CertIssAltNameadds a X.509 Certificate Issuer Alternate name attribute to an OKVTTLV object. - okvAttrAddX509CertSubj
okvAttrAddX509CertSubjadds a X.509 Certificate Subject distinguished name attribute to an OKVTTLV object. - okvAttrAddX509CertSubjAltName
okvAttrAddX509CertSubjAltNameadds a X.509 Certificate Subject Alternate name attribute to an OKVTTLV object. - okvAttrGetActivationDate
okvAttrGetActivationDategets the activation date attribute value from an OKVTTLV object. - okvAttrGetArchiveDate
okvAttrGetArchiveDategets the archive date attribute value from an OKVTTLV object. - okvAttrGetCertLen
okvAttrGetCertLengets the certificate length attribute value from an OKVTTLV object. - okvAttrGetCertType
okvAttrGetCertTypegets the certificate type attribute value from an OKVTTLV object. - okvAttrGetCompromiseDate
okvAttrGetCompromiseDategets the compromise date attribute value from an OKVTTLV object. - okvAttrGetCompromiseOccurrenceDate
okvAttrGetCompromiseOccurrenceDategets the compromise occurrence date attribute value from an OKVTTLV object. - okvAttrGetContactInfo
okvAttrGetContactInfogets the contact information attribute value from an OKVTTLV object. - okvAttrGetContactInfoLen
okvAttrGetContactInfoLengets the length of the contact information value of the contact information attribute. - okvAttrGetCryptoAlgo
okvAttrGetCryptoAlgogets the cryptographic algorithm attribute value from an OKVTTLV object. - okvAttrGetCryptoLen
okvAttrGetCryptoLengets the cryptographic length attribute value from an OKVTTLV object. - okvAttrGetCryptoParams
okvAttrGetCryptoParamsgets the cryptographic parameters attribute found at or after element indexelem_index. - okvAttrGetCryptoUsageMask
okvAttrGetCryptoUsageMaskgets the cryptographic usage mask attribute value from an OKVTTLV object. - okvAttrGetDeactivationDate
okvAttrGetDeactivationDategets the deactivation date attribute value from an OKVTTLV object. - okvAttrGetDestroyDate
okvAttrGetDestroyDategets the destroy date attribute value from an OKVTTLV object. - okvAttrGetDigest
okvAttrGetDigestgets the digest attribute found at or after element indexelem_index. - okvAttrGetDigestLen
okvAttrGetDigestLengets the length of the digest value of the digest attribute found at or after element indexelem_index. - okvAttrGetDigitalSignAlgo
okvAttrGetDigitalSignAlgogets the digital signature algorithm attribute value from an OKVTTLV object. - okvAttrGetExtractable
okvAttrGetExtractablegets the extractable attribute value from an OKVTTLV object. - okvAttrGetFresh
okvAttrGetFreshgets the fresh attribute value from an OKVTTLV object. - okvAttrGetInitialDate
okvAttrGetInitialDategets the initial date attribute value from an OKVTTLV object. - okvAttrGetLastChangeDate
okvAttrGetLastChangeDategets the last change date attribute value from an OKVTTLV object. - okvAttrGetLeaseTime
okvAttrGetLeaseTimegets the lease time attribute value from an OKVTTLV object. - okvAttrGetName
okvAttrGetNamegets the name value, attribute index, and name type of the name attribute found at or after element indexelem_index. - okvAttrGetNameValueLen
okvAttrGetNameValueLengets the length of the name value of the name attribute found at or after element indexelem_index. - okvAttrGetNeverExtractable
okvAttrGetNeverExtractablegets the never extractable attribute value from an OKVTTLV object. - okvAttrGetObjectGroup
okvAttrGetObjectGroupgets the object group value of the object group attribute found at or after element indexelem_index. - okvAttrGetObjectGroupLen
okvAttrGetObjectGroupLengets the length of the object group value of the object group attribute found at or after element indexelem_index. - okvAttrGetObjectType
okvAttrGetObjectTypegets the object type attribute value from an OKVTTLV object. - okvAttrGetProcessStartDate
okvAttrGetProcessStartDategets the process start date attribute value from an OKVTTLV object. - okvAttrGetProtectStopDate
okvAttrGetProtectStopDategets the protect stop date attribute value from an OKVTTLV object. - okvAttrGetRevocationReason
okvAttrGetRevocationReasongets the revocation reason attribute value from an OKVTTLV object. - okvAttrGetRevocationReasonMessageLen
okvAttrGetRevocationReasonMessageLengets the length of the revocation message value of the revocation reason attribute. - okvAttrGetState
okvAttrGetStategets the state attribute value from an OKVTTLV object. - okvAttrGetUniqueID
okvAttrGetUniqueIDgets the unique identifier attribute value from an OKVTTLV object. - okvAttrGetUniqueIDLen
okvAttrGetUniqueIDLengets the length of the unique identifier value of the unique identifier attribute. - okvAttrGetUsageLimits
okvAttrGetUsageLimitsgets the usage limits attribute value from an OKVTTLV object. - okvAttrGetX509CertId
okvAttrGetX509CertIdgets the X.509 Certificate ID attribute value from an OKVTTLV object. - okvAttrGetX509CertIdIssuerLen
okvAttrGetX509CertIdIssuerLengets the length of the certificate issuer value of the X.509 Certificate ID attribute from an OKVTTLV object. - okvAttrGetX509CertIdSerialNoLen
okvAttrGetX509CertIdSerialNoLengets the length of the certificate serial number value of the X.509 Certificate ID attribute from an OKVTTLV object. - okvAttrGetX509CertIss
okvAttrGetX509CertIssgets the X.509 Certificate Issuer distinguished name attribute value from an OKVTTLV object. - okvAttrGetX509CertIssAltName
okvAttrGetX509CertIssAltNamegets the X.509 Certificate Issuer alternate name attribute value from an OKVTTLV object found at or after the element indexelem_index. - okvAttrGetX509CertIssAltNameLen
okvAttrGetX509CertIssAltNameLengets the length of the X.509 Certificate Issuer Alternate name value from an OKVTTLV object found at or after the element indexelem_index. - okvAttrGetX509CertIssDNLen
okvAttrGetX509CertIssDNLengets the length of the X.509 Certificate Issuer distinguished name value from an OKVTTLV object. - okvAttrGetX509CertSubj
okvAttrGetX509CertSubjgets the X.509 Certificate Subject distinguished name attribute value from an OKVTTLV object. - okvAttrGetX509CertSubjAltName
okvAttrGetX509CertSubjAltNamegets the X.509 Certificate Subject alternate name attribute value from an OKVTTLV object found at or after the element indexelem_index. - okvAttrGetX509CertSubjAltNameLen
okvAttrGetX509CertSubjAltNameLengets the length of the X.509 Certificate Subject Alternate name value from an OKVTTLV object found at or after the element indexelem_index. - okvAttrGetX509CertSubjDNLen
okvAttrGetX509CertSubjDNLengets the length of the X.509 Certificate Subject distinguished name value from an OKVTTLV object. - okvGetAttributeObject
okvGetAttributeObjectgets the attribute, its name, and index from the parent attribute found at element indexelem_index.
12.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_SUCCESSis 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 thenameattribute.okvAttrGetAttr: Gets the attribute in the OKVTTLV parent object.
Note:
For the functions in this section that are used to set the attributes of type
date-time, do not set the time value to epoch time (January 1st, 1970 at UTC).
In Oracle Key Vault, setting the date-time attributes (such as,
ActivationDate, DeactivationDate,
ProcessStartDate, and ProtectStopDate) for
a security object to the epoch time has the same effect of not setting the
attribute at all. For example, if you set the ActivationDate
attribute of a security object to the epoch time to immediately activate the
object, then the object remains in the Pre-Active state. This is because Oracle
Key Vault treats the epoch value of the attribute as if the attribute is not set
at all.
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.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 12-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 Client SDK KMIP Attribute APIs
12.1.3 okvAttrAddArchiveDate
okvAttrAddArchiveDate adds an archive date attribute to an
OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddArchiveDate adds an archive date attribute to
an OKVTTLV object.
Syntax
OKVTTLV *okvAttrAddArchiveDate(OKVEnv *env, OKVTTLV *ttlv,
ub8 archive_date);Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to OKVTTLV object. |
archive_date |
|
Archive date. |
Return Values
| Return Value | Description |
|---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with archive date attribute value added. Failure: NULL Pointer. |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
time_t current_time = time((time_t *)NULL); okvAttrAddArchiveDate(env, ttlv, (ub8) current_time + 10000);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.4 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
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
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 Client SDK KMIP Attribute APIs
12.1.5 okvAttrAddActivationDate
okvAttrAddActivationDate adds the activation date attribute
to an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddActivationDate adds the activation date attribute to an
OKVTTLV 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
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
time_t current_time = time((time_t *)NULL); ... okvAttrAddActivationDate(env, attr_in, (ub8) current_time + 10000);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.6 okvAttrAddCertLen
okvAttrAddCertLen adds a certificate length attribute to an
OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddCertLen adds a certificate length attribute
to an OKVTTLV object.
Syntax
OKVTTLV *okvAttrAddCertLen(OKVEnv *env, OKVTTLV *ttlv,
ub4 cert_len);Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to OKVTTLV object. |
cert_len |
|
Certificate length. |
Return Values
| Return Value | Description |
|---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with certificate length attribute value added. Failure: |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
This API does only the client side processing to build the
OKVTTLV object that needs to be sent to the Oracle Key Vault
server. It does not do any server operation like the KMIP APIs.
Example
okvAttrAddCertLen(env, ttlv, (ub4)500);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.7 okvAttrAddCertType
okvAttrAddCertType adds a certificate type attribute to an
OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddCertType adds a certificate type attribute to
an OKVTTLV object.
Syntax
OKVTTLV *okvAttrAddCertType(OKVEnv *env, OKVTTLV *ttlv,
ub4 cert_typ);Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to OKVTTLV object. |
cert_typ |
|
Certificate type. |
Return Values
| Return Value | Description |
|---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with certificate type attribute value added. Failure: |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
This API does only the client side processing to build the
OKVTTLV object that needs to be sent to the Oracle Key Vault
server. It does not do any server operation like the KMIP APIs.
Example
okvAttrAddCertType(env, ttlv, OKVDEF_CERT_TYPE_X509);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.8 okvAttrAddCompromiseDate
okvAttrAddCompromiseDate adds a compromise date attribute to
an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddCompromiseDate adds a compromise date attribute to an
OKVTTLV 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
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
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 Client SDK KMIP Attribute APIs
12.1.9 okvAttrAddCompromiseOccurrenceDate
okvAttrAddCompromiseOccurrenceDate adds a compromise
occurrence date attribute to an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddCompromiseOccurrenceDate adds a compromise occurrence
date attribute to an OKVTTLV 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
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
ub8 comp_date; ctime(&comp_date); resulttlv = okvAttrAddCompromiseOccurrenceDate(env, ttlv, comp_date);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.10 okvAttrAddContactInfo
okvAttrAddContactInfo adds a contact information attribute
to an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddContactInfo adds a contact information attribute to an
OKVTTLV 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
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
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 Client SDK KMIP Attribute APIs
12.1.11 okvAttrAddCryptoAlgo
okvAttrAddCryptoAlgo adds a cryptographic algorithm
attribute to an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddCryptoAlgo adds a cryptographic algorithm attribute to an
OKVTTLV 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
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
attr = okvAddAttributeObject(env, templ, OKVAttrCryptoAlg, 0); okvAttrAddCryptoAlgo(env, attr, (ub4)CRYPTO_ALG_AES);
12.1.12 okvAttrAddCryptoLen
okvAttrAddCryptoLen adds a cryptographic length attribute
to an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddCryptoLen adds a cryptographic length attribute to an
OKVTTLV 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
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
attr = okvAddAttributeObject(env, templ, OKVAttrCryptoLen, 0); okvAttrAddCryptoLen(env, attr, (ub4)128);
12.1.13 okvAttrAddCryptoParams
okvAttrAddCryptoParams adds cryptographic parameters to an
OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddCryptoParams adds cryptographic parameters to an OKVTTLV
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
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
okvAttrAddCryptoParams(env, ttlv, BLK_CIPHER_ECB, PADDING_SSL3,
HASH_ALG_MD4, KEY_ROLE_CVK);12.1.14 okvAttrAddCryptoUsageMask
okvAttrAddCryptoUsageMask adds a cryptographic usage mask
attribute to an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddCryptoUsageMask adds a cryptographic usage mask attribute
to an OKVTTLV 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
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
OKVTTLV *resultttlv; resultttlv = okvAttrAddCryptoUsageMask(env, ttlv, (ub4)12);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.15 okvAttrAddDeactivationDate
okvAttrAddDeactivationDate adds a deactivation date
attribute to an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddDeactivationDate adds a deactivation date attribute to an
OKVTTLV 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
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
time_t current_time = time((time_t *)NULL); ... okvAttrAddDeactivationDate(env, ttlv, (ub8) current_date + 1800);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.16 okvAttrAddDestroyDate
okvAttrAddDestroyDate adds a destroy date attribute to an
OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddDestroyDate adds a destroy date attribute to an OKVTTLV
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
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
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 Client SDK KMIP Attribute APIs
12.1.17 okvAttrAddDigest
okvAttrAddDigest adds a digest attribute to an OKVTTLV
object.
Catetory
KMIP attribute API
Purpose
okvAttrAddDigest adds a digest attribute to an 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
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
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 Client SDK KMIP Attribute APIs
12.1.18 okvAttrAddDigitalSignAlgo
okvAttrAddDigitalSignAlgo adds a digital signature algorithm
attribute to an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddDigitalSignAlgo adds a digital signature
algorithm attribute to an OKVTTLV object.
Syntax
OKVTTLV *okvAttrAddDigitalSignAlgo(OKVEnv *env, OKVTTLV *ttlv,
ub4 digital_sign_alg);Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to OKVTTLV object. |
digital_sign_alg |
|
Digital Signature Algorithm. |
Return Values
| Return Value | Description |
|---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with digital signature algorithm attribute value added. Failure: NULL Pointer. |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
okvAttrAddDigitalSignAlgo(env, ttlv, SIGN_ALG_SHA256_W_RSA);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.19 okvAttrAddExtractable
okvAttrAddExtractable adds an extractable attribute to
an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddExtractable adds an extractable attribute to
an OKVTTLV object.
Syntax
OKVTTLV *okvAttrAddExtractable(OKVEnv *env, OKVTTLV *ttlv, ub8 extractable);
Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to OKVTTLV object. |
extractable |
|
Extractable attribute value. |
Return Values
| Return Value | Description |
|---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with extractable attribute value added. Failure: NULL Pointer. |
Supported Versions
Oracle Key Vault C SDK release 21.4.0.0.0 and later.
Comments
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
okvAttrAddExtractable(env, ttlv, (ub8)1);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.20 okvAttrAddFresh
okvAttrAddFresh adds a fresh attribute to an OKVTTLV
object.
Catetory
KMIP attribute API
Purpose
okvAttrAddFresh adds a fresh attribute to an OKVTTLV 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.
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
OKVTTLV *resulttlv; resulttlv = okvAttrAddFresh(env, attr_in, (ub8) 1);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.21 okvAttrAddInitialDate
okvAttrAddInitialDate adds an initial date attribute to an
OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddInitialDate adds an initial date attribute to
an OKVTTLV object.
Syntax
OKVTTLV *okvAttrAddInitialDate(OKVEnv *env, OKVTTLV *ttlv,
ub8 initial_date);Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to OKVTTLV object. |
initial_date |
|
Initial date. |
Return Values
| Return Value | Description |
|---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with initial date attribute value added. Failure: NULL Pointer. |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
time_t current_time = time((time_t *)NULL); okvAttrAddInitialDate(env, ttlv, (ub8) current_time + 10000);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.22 okvAttrAddLastChangeDate
okvAttrAddLastChangeDate adds a last change date attribute
to an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddLastChangeDate adds a last change date
attribute to an OKVTTLV object.
Syntax
OKVTTLV *okvAttrAddLastChangeDate(OKVEnv *env, OKVTTLV *ttlv,
ub8 last_change_date);Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to OKVTTLV object. |
last_change_date |
|
Last Change date. |
Return Values
| Return Value | Description |
|---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with last change date attribute value added. Failure: NULL Pointer. |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
time_t current_time = time((time_t *)NULL); okvAttrAddLastChangeDate(env, ttlv, (ub8) current_time + 10000);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.23 okvAttrAddLeaseTime
okvAttrAddLeaseTime adds a lease time attribute to an
OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddLeaseTime adds a lease time attribute to an OKVTTLV
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
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
OKVTTLV *resulttlv; resulttlv = okvAttrAddLeaseTime(env, ttlv, (ub4)100);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.24 okvAttrAddName
okvAttrAddName adds a name attribute to an OKVTTLV
object.
Catetory
KMIP attribute API
Purpose
okvAttrAddName adds a name attribute to an OKVTTLV 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
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
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 Client SDK KMIP Attribute APIs
12.1.25 okvAttrAddNeverExtractable
okvAttrAddNeverExtractable adds a never extractable
attribute to an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddNeverExtractable adds a never extractable
attribute to an OKVTTLV object.
Syntax
OKVTTLV *okvAttrAddNeverExtractable(OKVEnv *env, OKVTTLV *ttlv,
ub8 never_extractable);
Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to OKVTTLV object. |
never_extractable |
|
Never extractable attribute value. |
Return Values
| Return Value | Description |
|---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with never extractable attribute value added. Failure: NULL Pointer. |
Supported Versions
Oracle Key Vault C SDK release 21.4.0.0.0 and later.
Comments
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
okvAttrAddNeverExtractable(env, ttlv, (ub8)1);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.26 okvAttrAddObjectGroup
okvAttrAddObjectGroup adds an object group attribute to an
OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddObjectGroup adds an object group attribute to an OKVTTLV
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
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
OKVTTLV *resulttlv; oratext obj_grp[] = "Object_Group"; resulttlv = okvAttrAddObjectGroup(env, ttlv, &obj_grp[0], strlen(obj_grp));
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.27 okvAttrAddObjectType
okvAttrAddObjectType adds an object type attribute to an
OKVTTLV object.
Catetory
KMIP atrribute API
Purpose
okvAttrAddObjectType adds an object type attribute to an OKVTTLV
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
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
okvAttrAddObjectType(env, req, OKVObjSymmetric);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.28 okvAttrAddProcessStartDate
okvAttrAddProcessStartDate adds a process start date
attribute to an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddProcessStartDate adds a process start date attribute to
an OKVTTLV 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
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
time_t current_time = time((time_t *)NULL); ... okvAttrAddProcessStartDate(env, attr_temp, (ub8) current_time + 1000);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.29 okvAttrAddProtectStopDate
okvAttrAddProtectStopDate adds a protect stop date
attribute to an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddProtectStopDate adds a protect stop date attribute to an
OKVTTLV 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
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
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 Client SDK KMIP Attribute APIs
12.1.30 okvAttrAddRevocationReason
okvAttrAddRevocationReason adds the revocation reason
attribute to an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddRevocationReason adds the revocation reason attribute to
an OKVTTLV 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
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
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 Client SDK KMIP Attribute APIs
12.1.31 okvAttrAddState
okvAttrAddState adds a state attribute to an OKVTTLV
object.
Catetory
KMIP attribute API
Purpose
okvAttrAddState adds a state attribute to an OKVTTLV
object.
Syntax
OKVTTLV *okvAttrAddState(OKVEnv *env, OKVTTLV *ttlv, ub4 state);
Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to OKVTTLV object. |
state |
|
State. |
Return Values
| Return Value | Description |
|---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with state attribute value added. Failure: NULL Pointer. |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
okvAttrAddState(env, ttlv, (ub4)1);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.32 okvAttrAddUniqueID
okvAttrAddUniqueID adds a unique identifier attribute to an
OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddUniqueID adds a unique identifier attribute to an OKVTTLV
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
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
OKVTTLV *resultttlv; oratext uidval[] = "12345678901234567890"; resultttlv = okvAttrAddUniqueID(env, ttlv, &uidval[0], strlen(uidval));
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.33 okvAttrAddUsageLimits
okvAttrAddUsageLimits adds a usage limits attribute to an
OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddUsageLimits adds a usage limits attribute to an OKVTTLV
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
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
OKVTTLV *resulttlv; resulttlv = okvAttrAddUsageLimits(env, ttlv, (ub8) 256, (ub8) 256, (ub4) 1);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.34 okvAttrAddX509CertId
okvAttrAddX509CertId adds an issuer and serial number which
forms the X.509 Certificate ID attribute to an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddX509CertId adds an issuer and serial number
which forms the X.509 Certificate ID attribute to an OKVTTLV object.
Syntax
OKVTTLV *okvAttrAddX509CertId(OKVEnv *env, OKVTTLV *ttlv,
oratext *issuer, ub4 issuerl,
oratext *serialno, ub4 serialnol);Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to OKVTTLV object. |
issuer |
|
Certificate issuer. |
issuerl |
|
Certificate issuer length. |
serialno |
|
Certificate serial number. |
serialnol |
|
Certificate serial number length. |
Return Values
| Return Value | Description |
|---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with X.509 certificate id attribute value added. Failure: |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
oratext issuer[] = " DN CN=sample_issuer,OU=demo,O=Software,L=Redwood_City,ST=California,C=us";
oratext serialno[] = "0x01";
okvAttrAddX509CertId(env, ttlv, &issuer[0], strlen(issuer),
&serialno[0], strlen(serialno));
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.35 okvAttrAddX509CertIss
okvAttrAddX509CertIss adds a X.509 Certificate Issuer
distinguished name attribute to an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddX509CertIss adds a X.509 Certificate Issuer
distinguished name attribute to an OKVTTLV object.
Syntax
OKVTTLV *okvAttrAddX509CertIss(OKVEnv *env, OKVTTLV *ttlv,
oratext *dn, ub4 dnl);Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to OKVTTLV object. |
dn |
|
Certificate issuer distinguished name. |
dnl |
|
Certificate issuer distinguished name length. |
Return Values
| Return Value | Description |
|---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with X.509 certificate issuer distinguished name attribute value added. Failure: NULL Pointer. |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
oratext dn[] = "DN CN=sample_issuer,OU=demo,O=Software,L=Redwood_City,ST=California,C=us"; ub4 dnl = strlen((const char *)dn); okvAttrAddX509CertIss(env, ttlv, &dn[0], dnl);
12.1.36 okvAttrAddX509CertIssAltName
okvAttrAddX509CertIssAltName adds a X.509 Certificate Issuer
Alternate name attribute to an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddX509CertIssAltName adds a X.509 Certificate
Issuer Alternate name attribute to an OKVTTLV object.
Syntax
OKVErrNo okvAttrAddX509CertIssAltName(OKVEnv *env, OKVTTLV *ttlv,
oratext *alt_name, ub4 alt_namel);Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to OKVTTLV object. |
alt_name |
|
Certificate issuer alternate name. |
alt_namel |
|
Certificate issuer alternate name length. |
Return Values
| Return Value | Description |
|---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failture: A valid error number is returned for the error on top of the error stack. |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
oratext alt_name[] = "www.example.com"; ub4 alt_namel = strlen((const char *)dn); okvAttrAddX509CertIssAltName(env, ttlv, &alt_name[0], alt_namel);
12.1.37 okvAttrAddX509CertSubj
okvAttrAddX509CertSubj adds a X.509 Certificate Subject
distinguished name attribute to an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddX509CertSubj adds a X.509 Certificate Subject
distinguished name attribute to an OKVTTLV object.
Syntax
OKVTTLV *okvAttrAddX509CertSubj(OKVEnv *env, OKVTTLV *ttlv,
oratext *dn, ub4 dnl);Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to OKVTTLV object. |
dn |
|
Certificate subject distinguished name. |
dnl |
|
Certificate subject distinguished name length. |
Return Values
| Return Value | Description |
|---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with X.509 certificate subject distinguished name attribute value added. Failure: |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs
Example
oratext dn[] = "DN CN=sample_subject,OU=demo,O=Software,L=Redwood_City,ST=California,C=us"; ub4 dnl = strlen((const char *)dn); okvAttrAddX509CertSubj(env, ttlv, &dn[0], dnl);
12.1.38 okvAttrAddX509CertSubjAltName
okvAttrAddX509CertSubjAltName adds a X.509 Certificate
Subject Alternate name attribute to an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrAddX509CertSubjAltName adds a X.509 Certificate
Subject Alternate name attribute to an OKVTTLV object.
Syntax
OKVErrNo okvAttrAddX509CertSubjAltName(OKVEnv *env, OKVTTLV *ttlv,
oratext *alt_name, ub4 alt_namel);Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to OKVTTLV object. |
alt_name |
|
Certificate subject alternate name. |
alt_namel |
|
Certificate subject alternate name length. |
Return Values
| Return Value | Description |
|---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failture: A valid error number is returned for the error on top of the error stack. |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
This API does only the client side processing to build the OKVTTLV object that needs to be sent to the Oracle Key Vault server. It does not do any server operation like the KMIP APIs.
Example
oratext alt_name[] = "www.example.com"; ub4 alt_namel = strlen((const char *)dn); okvAttrAddX509CertSubjAltName(env, ttlv, &alt_name[0], alt_namel);
12.1.39 okvAttrGetActivationDate
okvAttrGetActivationDate gets the activation date attribute
value from an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrGetActivationDate gets the activation date attribute value
from an 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 Client SDK KMIP Attribute APIs
12.1.40 okvAttrGetArchiveDate
okvAttrGetArchiveDate gets the archive date attribute value
from an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrGetArchiveDate gets the archive date attribute value from an
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 Client SDK KMIP Attribute APIs
12.1.41 okvAttrGetCertLen
okvAttrGetCertLen gets the certificate length attribute
value from an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrGetCertLen gets the certificate length attribute
value from an OKVTTLV object.
Syntax
OKVErrNo okvAttrGetCertLen(OKVEnv *env, OKVTTLV *ttlv,
ub4 *cert_len);Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to the OKVTTLV object. |
cert_len |
|
Certificate 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. |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
None.
Example
ub4 cert_len = 0; okvAttrGetCertLen(env, ttlv, &cert_len);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.42 okvAttrGetCertType
okvAttrGetCertType gets the certificate type attribute value
from an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrGetCertType gets the certificate type attribute
value from an OKVTTLV object.
Syntax
OKVErrNo okvAttrGetCertType(OKVEnv *env, OKVTTLV *ttlv,
ub4 *cert_typ);Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to the OKVTTLV object. |
cert_typ |
|
Certificate 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. |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
None.
Example
ub4 cert_type = 0; okvAttrGetCertType(env, ttlv, &cert_type);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.43 okvAttrGetCompromiseDate
okvAttrGetCompromiseDate gets the compromise date attribute
value from an OKVTTLV object.
Category
KMIP attribute API
Purpose
okvAttrGetCompromiseDate gets the compromise date attribute value
from an 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 Client SDK KMIP Attribute APIs
12.1.44 okvAttrGetCompromiseOccurrenceDate
okvAttrGetCompromiseOccurrenceDate gets the compromise
occurrence date attribute value from an OKVTTLV object.
Category
KMIP attribute API
Purpose
okvAttrGetCompromiseOccurrenceDate gets the compromise occurrence
date attribute value from an 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 Client SDK KMIP Attribute APIs
12.1.45 okvAttrGetContactInfo
okvAttrGetContactInfo gets the contact information attribute
value from an OKVTTLV object.
Category
KMIP attribute API
Purpose
okvAttrGetContactInfo gets the contact information attribute value
from an 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 Client SDK KMIP Attribute APIs
12.1.46 okvAttrGetContactInfoLen
okvAttrGetContactInfoLen gets the length of the contact
information value of the contact information attribute.
Category
KMIP attribute API
Purpose
okvAttrGetContactInfoLen gets the length of the contact information
value 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 Client SDK KMIP Attribute APIs
12.1.47 okvAttrGetCryptoAlgo
okvAttrGetCryptoAlgo gets the cryptographic algorithm
attribute value from an OKVTTLV object.
Category
KMIP attribute API
Purpose
okvAttrGetCryptoAlgo gets the cryptographic algorithm attribute
value from an 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);
12.1.48 okvAttrGetCryptoLen
okvAttrGetCryptoLen gets the cryptographic length attribute
value from an OKVTTLV object.
Category
KMIP attribute API
Purpose
okvAttrGetCryptoLen gets the cryptographic length attribute value
from an 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);
12.1.49 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);
12.1.50 okvAttrGetCryptoUsageMask
okvAttrGetCryptoUsageMask gets the cryptographic usage mask
attribute value from an OKVTTLV object.
Category
KMIP attribute API
Purpose
okvAttrGetCryptoUsageMask gets the cryptographic usage mask
attribute value from an 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 Client SDK KMIP Attribute APIs
12.1.51 okvAttrGetDeactivationDate
okvAttrGetDeactivationDate gets the deactivation date
attribute value from an OKVTTLV object.
Category
KMIP attribute API
Purpose
okvAttrGetDeactivationDate gets the deactivation date attribute
value from an 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 Client SDK KMIP Attribute APIs
12.1.52 okvAttrGetDestroyDate
okvAttrGetDestroyDate gets the destroy date attribute value
from an OKVTTLV object.
Category
KMIP attribute API
Purpose
okvAttrGetDestroyDate gets the destroy date attribute value from an
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 Client SDK KMIP Attribute APIs
12.1.53 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 Client SDK KMIP Attribute APIs
12.1.54 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 Client SDK KMIP Attribute APIs
12.1.55 okvAttrGetDigitalSignAlgo
okvAttrGetDigitalSignAlgo gets the digital signature
algorithm attribute value from an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrGetDigitalSignAlgo gets the digital signature
algorithm attribute value from an OKVTTLV object.
Syntax
OKVErrNo okvAttrGetDigitalSignAlgo(OKVEnv *env, OKVTTLV *ttlv,
ub4 *elem_index,
ub4 *digital_sign_alg);Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to the OKVTTLV object. |
digital_sign_alg |
|
Digital Signature Algorithm. |
Return Values
| Return Value | Description |
|---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failture: A valid error number is returned for the error on top of the error stack. |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
None.
Example
ub4 digital_sign_algo = 0; okvAttrGetDigitalSignAlgo(env, ttlv, &digital_sign_algo);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.56 okvAttrGetExtractable
okvAttrGetExtractable gets the extractable attribute
value from an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrGetExtractable gets the extractable attribute
value from an OKVTTLV object.
Syntax
OKVErrNo okvAttrGetExtractable(OKVEnv *env, OKVTTLV *ttlv, ub8 *extractable);
Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to OKVTTLV object. |
extractable |
|
Extractable attribute value. |
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. |
Supported Versions
Oracle Key Vault C SDK release 21.4.0.0.0 and later.
Comments
None.
Example
ub8 extractable; okvAttrGetExtractable(env, ttlv, &extractable);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.57 okvAttrGetFresh
okvAttrGetFresh gets the fresh attribute value from an
OKVTTLV object.
Category
KMIP attribute API
Purpose
okvAttrGetFresh gets the fresh attribute value from an 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 Client SDK KMIP Attribute APIs
12.1.58 okvAttrGetInitialDate
okvAttrGetInitialDate gets the initial date attribute value
from an OKVTTLV object.
Category
KMIP attribute API
Purpose
okvAttrGetInitialDate gets the initial date attribute value from an
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 Client SDK KMIP Attribute APIs
12.1.59 okvAttrGetLastChangeDate
okvAttrGetLastChangeDate gets the last change date
attribute value from an OKVTTLV object.
Category
KMIP attribute API
Purpose
okvAttrGetLastChangeDate gets the last change date attribute value
from an 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 Client SDK KMIP Attribute APIs
12.1.60 okvAttrGetLeaseTime
okvAttrGetLeaseTime gets the lease time attribute value
from an OKVTTLV object.
Category
KMIP attribute API
Purpose
okvAttrGetLeaseTime gets the lease time attribute value from an
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 Client SDK KMIP Attribute APIs
12.1.61 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 Client SDK KMIP Attribute APIs
12.1.62 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 Client SDK KMIP Attribute APIs
12.1.63 okvAttrGetNeverExtractable
okvAttrGetNeverExtractable gets the never extractable
attribute value from an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrGetNeverExtractable gets the never extractable
attribute value from an OKVTTLV object.
Syntax
OKVErrNo okvAttrGetNeverExtractable(OKVEnv *env, OKVTTLV *ttlv,
ub8 *never_extractable);
Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to OKVTTLV object. |
never_extractable |
|
Never extractable attribute value. |
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. |
Supported Versions
Oracle Key Vault C SDK release 21.4.0.0.0 and later.
Comments
None.
Example
ub8 never_extractable; okvAttrGetNeverExtractable(env, ttlv, &never_extractable);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.64 okvAttrGetObjectGroup
okvAttrGetObjectGroup gets the object group value of the
object group attribute found at or after element index elem_index.
Category
KMIP attribute API
Purpose
okvAttrGetObjectGroup gets the object group value of 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 Client SDK KMIP Attribute APIs
12.1.65 okvAttrGetObjectGroupLen
okvAttrGetObjectGroupLen gets the length of the object
group value of the object group attribute 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 Client SDK KMIP Attribute APIs
12.1.66 okvAttrGetObjectType
okvAttrGetObjectType gets the object type attribute value
from an OKVTTLV object.
Category
KMIP attribute API
Purpose
okvAttrGetObjectType gets the object type attribute value from an
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 Client SDK KMIP Attribute APIs
12.1.67 okvAttrGetProcessStartDate
okvAttrGetProcessStartDate gets the process start date
attribute value from an OKVTTLV object.
Category
KMIP attribute API
Purpose
okvAttrGetProcessStartDate gets the process start date attribute
value from an 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 Client SDK KMIP Attribute APIs
12.1.68 okvAttrGetProtectStopDate
okvAttrGetProtectStopDate gets the protect stop date
attribute value from an OKVTTLV object.
Category
KMIP attribute API
Purpose
okvAttrGetProtectStopDate gets the protect stop date attribute value
from an 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 Client SDK KMIP Attribute APIs
12.1.69 okvAttrGetRevocationReason
okvAttrGetRevocationReason gets the revocation reason
attribute value from an OKVTTLV object.
Category
KMIP attribute API
Purpose
okvAttrGetRevocationReason gets the revocation reason attribute
value from an 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 Client SDK KMIP Attribute APIs
12.1.70 okvAttrGetRevocationReasonMessageLen
okvAttrGetRevocationReasonMessageLen gets the length of the
revocation message value of the revocation reason attribute.
Category
KMIP attribute API
Purpose
okvAttrGetRevocationReasonMessageLen gets the length of the
revocation message value of the revocation reason attribute.
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 Client SDK KMIP Attribute APIs
12.1.71 okvAttrGetState
okvAttrGetState gets the state attribute value from an
OKVTTLV object.
Category
KMIP attribute API
Purpose
okvAttrGetState gets the state attribute value from an 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 Client SDK KMIP Attribute APIs
12.1.72 okvAttrGetUniqueID
okvAttrGetUniqueID gets the unique identifier attribute
value from an OKVTTLV object.
Category
KMIP attribute API
Purpose
okvAttrGetUniqueID gets the unique identifier attribute value from
an 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 Client SDK KMIP Attribute APIs
12.1.73 okvAttrGetUniqueIDLen
okvAttrGetUniqueIDLen gets the length of the unique
identifier value of the unique identifier
attribute.
Category
KMIP attribute API
Purpose
okvAttrGetUniqueIDLen gets the length of the unique identifier value
of the unique identifier attribute.
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 Client SDK KMIP Attribute APIs
12.1.74 okvAttrGetUsageLimits
okvAttrGetUsageLimits gets the usage limits attribute value
from an OKVTTLV object.
Category
KMIP attribute API
Purpose
okvAttrGetUsageLimits() gets the usage limit attribute value from an
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 Client SDK KMIP Attribute APIs
12.1.75 okvAttrGetX509CertId
okvAttrGetX509CertId gets the X.509 Certificate ID attribute
value from an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrGetX509CertId gets the X.509 Certificate ID
attribute value from an OKVTTLV object.
Syntax
OKVErrNo okvAttrGetX509CertId(OKVEnv *env, OKVTTLV *ttlv,
oratext *issuer, ub4 *issuerl,
oratext *serialno, ub4 *serialnol);Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to the OKVTTLV object. |
issuer |
|
Certificate issuer. |
issuerl |
|
Certificate issuer length. |
serialno |
|
Certificate serial number. |
serialnol |
|
Certificate serial number 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. |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
The memory to store the X.509 Certificate ID value which consists of
issuer and serial number values should be allocated before this API is called.
okvAttrGetX509CertIdIssuerLen and
okvAttrGetX509CertIdSerialNoLen can be used to get the issuer
and serial number value lengths respectively.
Example
oratext *issuer = (oratext *)NULL;
oratext *serial = (oratext *)NULL;
ub4 issuer_len = okvAttrGetX509CertIdIssuerLen(env, ttlv);
ub4 serial_len = okvAttrGetX509CertIdSerialNoLen(env, ttlv);
issuer = calloc(issuer_len + 1, sizeof(oratext));
serial = calloc(serial_len + 1, sizeof(oratext));
okvAttrGetX509CertId(env, ttlv, issuer, &issuer_len,
serial, &serial_len);
/* Free 'issuer' and 'serial' */
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.76 okvAttrGetX509CertIdIssuerLen
okvAttrGetX509CertIdIssuerLen gets the length of the
certificate issuer value of the X.509 Certificate ID attribute from an OKVTTLV
object.
Catetory
KMIP attribute API
Purpose
okvAttrGetX509CertIdIssuerLen gets the length of the
certificate issuer value of the X.509 Certificate ID attribute from an OKVTTLV
object.
Syntax
ub4 okvAttrGetX509CertIdIssuerLen(OKVEnv *env, OKVTTLV *ttlv);
Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to the OKVTTLV object. |
Return Values
| Return Value | Description |
|---|---|
ub4 |
Length of the attribute value. Success: Length of the certificate issuer value of the X.509 Certificate ID. Failure: 0 |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
None.
Example
ub4 issuerl = 0; issuerl = okvAttrGetX509CertIdIssuerLen(env, ttlv);
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.77 okvAttrGetX509CertIdSerialNoLen
okvAttrGetX509CertIdSerialNoLen gets the length of the
certificate serial number value of the X.509 Certificate ID attribute from an OKVTTLV
object.
Catetory
KMIP attribute API
Purpose
okvAttrGetX509CertIdSerialNoLen gets the length of the
certificate serial number value of the X.509 Certificate ID attribute from an
OKVTTLV object.
Syntax
ub4 okvAttrGetX509CertIdSerialNoLen(OKVEnv *env, OKVTTLV *ttlv);
Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to the OKVTTLV object. |
Return Values
| Return Value | Description |
|---|---|
ub4 |
Length of the attribute value. Success: Length of the certificate serial number value of the X.509 Certificate ID. Failure: 0 |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
None.
Example
ub4 serialnol = 0; serialnol = okvAttrGetX509CertIdSerialNoLen(env, ttlv);
Parent topic: Oracle Key Vault Client SDK KMIP Attribute APIs
12.1.78 okvAttrGetX509CertIss
okvAttrGetX509CertIss gets the X.509 Certificate Issuer
distinguished name attribute value from an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrGetX509CertIss gets the X.509 Certificate Issuer
distinguished name attribute value from an OKVTTLV object.
Syntax
OKVErrNo okvAttrGetX509CertIss(OKVEnv *env, OKVTTLV *ttlv,
oratext *dn, ub4 *dnl);Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to the OKVTTLV object. |
dn |
|
Certificate Issuer distinguished name. |
dnl |
|
Certificate Issuer distinguished name length. |
Return Values
| Return Value | Description |
|---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failture: A valid error number is returned for the error on top of the error stack. |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
The memory to store the X.509 Certificate Issuer distinguished name value should be allocated before this API is called.
okvAttrGetX509CertIssDNLen can be used to get the X.509 Certificate
Issuer distinguished name value length.
Example
oratext *issuer = (oratext *)NULL; ub4 issuer_len = okvAttrGetX509CertIssDNLen(env, ttlv); issuer = calloc(issuer_len + 1, sizeof(oratext)); okvAttrGetX509CertIss(env, ttlv, issuer, &issuer_len); /* Free 'issuer' */
12.1.79 okvAttrGetX509CertIssAltName
okvAttrGetX509CertIssAltName gets the X.509 Certificate
Issuer alternate name attribute value from an OKVTTLV object found at or after the element
index elem_index.
Catetory
KMIP attribute API
Purpose
okvAttrGetX509CertIssAltName gets the X.509 Certificate
Issuer alternate name attribute value from an OKVTTLV object found at or after the
element index elem_index.
Syntax
OKVErrNo okvAttrGetX509CertIssAltName(OKVEnv *env, OKVTTLV *ttlv,
ub4 *elem_index,
oratext *alt_name, ub4 *alt_namel);Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to the OKVTTLV object. |
elem_index |
|
Index of child OKVTTLV to start the lookup. |
alt_name |
|
Certificate Issuer Alternate name. |
alt_namel |
|
Certificate Issuer Alternate name length. |
Return Values
| Return Value | Description |
|---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failture: A valid error number is returned for the error on top of the error stack. |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
The memory to store the X.509 Certificate Issuer alternate name value should be allocated before the function call.
okvAttrGetX509CertIssAltNameLen can be used to get the X.509
Certificate Issuer alternate name value length.
Example
oratext *issuer_alt_name = (oratext *)NULL;
ub4 issuer_alt_name_len = okvAttrGetX509CertIssAltNameLen(env, ttlv, 0);
issuer_alt_name = calloc(issuer_alt_name_len + 1, sizeof(oratext));
okvAttrGetX509CertIssAltName(env, ttlv, 0, issuer_alt_name,
&issuer_alt_name_len);
/* Free 'issuer_alt_name' */
12.1.80 okvAttrGetX509CertIssAltNameLen
okvAttrGetX509CertIssAltNameLen gets the length of the X.509
Certificate Issuer Alternate name value from an OKVTTLV object found at or after the element
index elem_index.
Catetory
KMIP attribute API
Purpose
okvAttrGetX509CertIssAltNameLen gets the length of the
X.509 Certificate Issuer Alternate name value from an OKVTTLV object found at or
after the element index elem_index.
Syntax
Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to the OKVTTLV object. |
elem_index |
|
Index of child OKVTTLV to start the lookup. |
Return Values
| Return Value | Description |
|---|---|
ub4 |
Length of the attribute value. Success: Length of the X.509 certificate issuer alternate name value. Failure: 0. |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
None.
Example
ub4 issuer_alt_namel = 0; issuer_alt_namel = okvAttrGetX509CertIssAltNameLen(env, ttlv, 0);
12.1.81 okvAttrGetX509CertIssDNLen
okvAttrGetX509CertIssDNLen gets the length of the X.509
Certificate Issuer distinguished name value from an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrGetX509CertIssDNLen gets the length of the X.509
Certificate Issuer distinguished name value from an OKVTTLV object.
Syntax
ub4 okvAttrGetX509CertIssDNLen(OKVEnv *env, OKVTTLV *ttlv);
Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to the OKVTTLV object. |
Return Values
| Return Value | Description |
|---|---|
ub4 |
Length of the attribute value. Success: Length of the X.509 certificate issuer distinguished name value. Failure: 0. |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
None.
Example
ub4 issuerl = 0; issuerl = okvAttrGetX509CertIssDNLen(env, ttlv);
12.1.82 okvAttrGetX509CertSubj
okvAttrGetX509CertSubj gets the X.509 Certificate Subject
distinguished name attribute value from an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrGetX509CertSubj gets the X.509 Certificate
Subject distinguished name attribute value from an OKVTTLV object.
Syntax
OKVErrNo okvAttrGetX509CertSubj(OKVEnv *env, OKVTTLV *ttlv,
oratext *dn, ub4 *dnl);Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to the OKVTTLV object. |
dn |
|
Certificate Subject distinguished name. |
dnl |
|
Certificate Subject distinguished name length. |
Return Values
| Return Value | Description |
|---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failture: A valid error number is returned for the error on top of the error stack. |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
The memory to store the X.509 Certificate Subject distinguished name value should be allocated before this API is called.
okvAttrGetX509CertSubjDNLen can be used to get the X.509 Certificate
Subject distinguished name value length.
Example
oratext *subject = (oratext *)NULL; ub4 subject_len = okvAttrGetX509CertSubjDNLen(env, ttlv); subject = calloc(subject_len + 1, sizeof(oratext)); okvAttrGetX509CertSubj(env, ttlv, subject, &subject_len); /* Free 'subject' */
12.1.83 okvAttrGetX509CertSubjAltName
okvAttrGetX509CertSubjAltName gets the X.509 Certificate
Subject alternate name attribute value from an OKVTTLV object found at or after the element
index elem_index.
Catetory
KMIP attribute API
Purpose
okvAttrGetX509CertSubjAltName gets the X.509
Certificate Subject alternate name attribute value from an OKVTTLV object found at
or after the element index elem_index.
Syntax
OKVErrNo okvAttrGetX509CertSubjAltName(OKVEnv *env, OKVTTLV *ttlv,
ub4 *elem_index,
oratext *alt_name, ub4 *alt_namel);Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to the OKVTTLV object. |
elem_index |
|
Index of child OKVTTLV to start the lookup. |
alt_name |
|
Certificate Subject Alternate name. |
alt_namel |
|
Certificate Subject Alternate name length. |
Return Values
| Return Value | Description |
|---|---|
OKVErrNo |
Oracle Key Vault error number. Success: Failture: A valid error number is returned for the error on top of the error stack. |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
The memory to store the X.509 Certificate Subject alternate name value should be allocated before the function call.
okvAttrGetX509CertSubjAltNameLen can be used to get the X.509
Certificate Subject alternate name value length.
Example
oratext *subject_alt_name = (oratext *)NULL;
ub4 subject_alt_name_len = okvAttrGetX509CertSubjAltNameLen(env, ttlv, 0);
subject_alt_name = calloc(subject_alt_name_len + 1, sizeof(oratext));
okvAttrGetX509CertSubjAltName(env, ttlv, 0, subject_alt_name,
&subject_alt_name_len);
/* Free 'subject_alt_name' */
12.1.84 okvAttrGetX509CertSubjAltNameLen
okvAttrGetX509CertSubjAltNameLen gets the length of the
X.509 Certificate Subject Alternate name value from an OKVTTLV object found at or after the
element index elem_index.
Catetory
KMIP attribute API
Purpose
okvAttrGetX509CertSubjAltNameLen gets the length of the
X.509 Certificate Subject Alternate name value from an OKVTTLV object found at or
after the element index elem_index.
Syntax
ub4 okvAttrGetX509CertSubjAltNameLen(OKVEnv *env, OKVTTLV *ttlv,
ub4 *elem_index);Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to the OKVTTLV object. |
elem_index |
|
Index of child OKVTTLV to start the lookup. |
Return Values
| Return Value | Description |
|---|---|
ub4 |
Length of the attribute value. Success: Length of the X.509 certificate subject alternate name value. Failure: 0. |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
None.
Example
ub4 subj_alt_namel = 0; subj_alt_namel = okvAttrGetX509CertSubjAltNameLen(env, ttlv, 0);
12.1.85 okvAttrGetX509CertSubjDNLen
okvAttrGetX509CertSubjDNLen gets the length of the X.509
Certificate Subject distinguished name value from an OKVTTLV object.
Catetory
KMIP attribute API
Purpose
okvAttrGetX509CertSubjDNLen gets the length of the
X.509 Certificate Subject distinguished name value from an OKVTTLV object.
Syntax
ub4 okvAttrGetX509CertSubjDNLen(OKVEnv *env, OKVTTLV *ttlv);
Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
|
Pointer to the Oracle Key Vault environment handle. |
ttlv |
|
Pointer to the OKVTTLV object. |
Return Values
| Return Value | Description |
|---|---|
ub4 |
Length of the attribute value. Success: Length of the X.509 certificate subject distinguished name value. Failure: 0. |
Supported Versions
Oracle Key Vault C SDK version 21.2.0.0.0 and later.
Comments
None.
Example
ub4 subjl = 0; subjl = okvAttrGetX509CertSubjDNLen(env, ttlv);
12.1.86 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 Client SDK KMIP Attribute APIs
12.2 Oracle Key Vault Client SDK 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. - okvCustomAttrAddBigInteger
okvCustomAttrAddBigIntegeradds a big integer data to the custom attribute specified by the OKVTTLV parent object. - okvCustomAttrAddBoolean
okvCustomAttrAddBooleanadds a Boolean data type to the custom attribute specified by the OKVTTLV parent object. - okvCustomAttrAddByteString
okvCustomAttrAddByteStringadds a byte string data type to the custom attribute specified by the OKVTTLV parent object. - okvCustomAttrAddDateTime
okvCustomAttrAddDateTimeadds a date time data type to the custom attribute specified by the OKVTTLV parent object. - okvCustomAttrAddEnum
okvCustomAttrAddEnumadds an enumeration data type to the custom attribute specified by the OKVTTLV parent object. - okvCustomAttrAddInteger
okvCustomAttrAddIntegeradds an integer data type to the custom attribute specified by the OKVTTLV parent object. - okvCustomAttrAddInterval
okvCustomAttrAddIntervaladds an interval data type to the custom attribute specified by the OKVTTLV parent object. - okvCustomAttrAddLongInteger
okvCustomAttrAddLongIntegeradds a long integer data type to the custom attribute specified by the OKVTTLV parent object. - okvCustomAttrAddStructure
okvCustomAttrAddStructureadds aTTLVstructure to the custom attribute specified by the OKVTTLV parent object. - okvCustomAttrAddTextString
okvCustomAttrAddTextStringadds a text string data type to the custom attribute specified by the OKVTTLV parent object. - okvCustomAttrGet
okvCustomAttrGetfinds any custom attribute at or after element indexelem_ind. - okvCustomAttrGetBigInteger
okvCustomAttrGetBigIntegerreturns the big integer data found at element indexelem_indin the custom attribute specified by the OKVTTLV parent object along with the attribute index. - okvCustomAttrGetBigIntegerLen
okvCustomAttrGetBigIntegerLenreturns the length of the big integer data found at element indexelem_indin the custom attribute specified by the OKVTTLV parent object. - okvCustomAttrGetBoolean
okvCustomAttrGetBooleanfetches a Boolean data type found at the element indexelem_ind. - okvCustomAttrGetByName
okvCustomAttrGetByNamefinds custom attribute with namenameat or after the element indexelem_ind. - okvCustomAttrGetByteString
okvCustomAttrGetByteStringreturns the byte string data type found at the element indexelem_ind. - okvCustomAttrGetByteStringLen
okvCustomAttrGetByteStringLenreturns the length of the byte string data type found at the element indexelem_ind. - okvCustomAttrGetByType
okvCustomAttrGetByTypefinds any custom attribute of typetypat or after the element indexelem_ind, and returns the actual element index and length of the name of the custom attribute. - okvCustomAttrGetDateTime
okvCustomAttrGetDateTimereturns a date time data type found at the element indexelem_ind. - okvCustomAttrGetEnum
okvCustomAttrGetEnumreturns an enumeration data type found at the element indexelem_ind. - okvCustomAttrGetInteger
Returns an integer data type found at element indexelem_indin the custom attribute specified by the OKVTTLV parent object along with the attribute index. - okvCustomAttrGetInterval
okvCustomAttrGetIntervalreturns an interval data type found at the element indexelem_ind. - okvCustomAttrGetLongInteger
okvCustomAttrGetLongIntegerreturns a long integer data type found at the element indexelem_ind. - okvCustomAttrGetStructure
okvCustomAttrGetStructurereturns aTTLVstructure data type found at element indexelem_ind. - okvCustomAttrGetTextString
okvCustomAttrGetTextStringreturns the text string data type found at the element indexelem_ind. - okvCustomAttrGetTextStringLen
okvCustomAttrGetTextStringLenreturns the length of the text string data type found at the element indexelem_ind.
12.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.
x- only. Any
Oracle Key Vault custom attribute not starting with this prefix will be
rejected.
Note:
Do not use the prefix ofx-OKV with
custom attribute names. The custom attributes that start with the
x-OKV prefix are reserved for use by Oracle
Key Vault only.
Functions that return the OKVTTLV object have the following
interpretation:
-
On success, a valid
OKVTTLVobject for the attribute is returned. -
On failure, a
NULLpointer 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:
-
okvCustomAttrAddTypeadds the custom attribute name and value to theOKVTTLVparent object. -
okvCustomAttrGetTypeLengets the length of the custom attribute value from theOKVTTLVparent object for KMIP Data Types that don’t have fixed length. -
okvCustomAttrGetTypegets the custom attribute name and value from theOKVTTLVparent 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 Client SDK KMIP Custom Attribute APIs
12.2.2 okvCustomAttrAddBigInteger
okvCustomAttrAddBigInteger adds a big integer data to the
custom attribute specified by the OKVTTLV parent object.
Category
KMIP custom attributes API
Purpose
okvCustomAttrAddBigInteger adds a big integer data to
the custom attribute specified by the OKVTTLV parent object.
Syntax
OKVTTLV *okvCustomAttrAddBigInteger(OKVEnv *env, OKVTTLV *ttlv,
oratext *name, ub4 namel,
ub1 *big_integer,
ub4 big_integerl,
ub4 attr_index);
Parameters
| Parameter | IN/OUT | Description |
|---|---|---|
env |
IN |
Oracle Key Vault environment handle. |
ttlv |
IN |
TTLV parent object. |
name |
IN |
Name of the custom attribute. |
namel |
IN |
Length of the name of custom attribute. |
big_integer |
IN |
Big Integer value to be added to the custom attribute. |
big_integer1 |
IN |
Big Integer value length. |
attr_index |
IN |
Attribute index of the Big Integer custom attribute. |
Return Values
| Return Value | Description |
|---|---|
OKVTTLV * |
Pointer to OKVTTLV object. Success: Pointer to OKVTTLV object with big integer data type added. Failure: |
Supported Versions:
Oracle Key Vault C SDK version 21.8.0.0.0 and later.
Comments
None.
Example
OKVTTLV *req = (OKVTTLV *) NULL;
OKVTTLV *attr_in = (OKVTTLV *)NULL;
ub1 big_int[] = {-1, -1, 114, 48, 77, 100, 52, 60};
...
req = okvEnvGetOpRequestObj(env);
attr_in = okvCustomAttrAddBigInteger(env, req,“x-My Big Integer”,
strlen(“x-My Big Integer”),
big_int,
strlen(big_int), 0);
okvAddAttribute(env, uid, &attr_in);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Custom Attribute APIs
12.2.3 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 Client SDK KMIP Custom Attribute APIs
12.2.4 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 Client SDK KMIP Custom Attribute APIs
12.2.5 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 Client SDK KMIP Custom Attribute APIs
12.2.6 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 Client SDK KMIP Custom Attribute APIs
12.2.7 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 Client SDK KMIP Custom Attribute APIs
12.2.8 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 Client SDK KMIP Custom Attribute APIs
12.2.9 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 Client SDK KMIP Custom Attribute APIs
12.2.10 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 Client SDK KMIP Custom Attribute APIs
12.2.11 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 Client SDK KMIP Custom Attribute APIs
12.2.12 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 Client SDK KMIP Custom Attribute APIs
12.2.13 okvCustomAttrGetBigInteger
okvCustomAttrGetBigInteger returns the big integer data
found at element index elem_ind in the custom attribute specified by the
OKVTTLV parent object along with the attribute index.
Category
KMIP custom attributes API
Purpose
okvCustomAttrGetBigInteger returns the big integer
data found at element index elem_ind in the custom attribute specified
by the OKVTTLV parent object along with the attribute index.
Syntax
OKVErrNo okvCustomAttrGetBigInteger(OKVEnv *env, OKVTTLV *ttlv,
ub4 elem_ind,
oratext *name, ub4 *namel,
ub1 *big_integer,
ub4 *big_integerl,
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 custom attribute. |
big_integer |
OUT |
Big Integer value. |
big_integer1 |
IN/OUT |
Big Integer value length. |
attr_index |
OUT |
Attribute index of the Big 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. |
Supported Versions:
Oracle Key Vault C SDK version 21.8.0.0.0 and later.
Comments
- Memory for the buffer for the Big Integer Data Type should be pre-allocated
and the size of memory passed in as
big_integerl. - 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 andnamelshould 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 Big Integer";
ub4 attr_index = 0;
ub4 elem_ind = 0;
ub4 big_intl;
ub4 namel = 100;
ub4 i = 0;
...
okvGetAttributes(env, uid, 1, (oratext **) attr_name_list,
&ttlv);
big_intl = okvCustomAttrGetBigIntegerLen(env, ttlv, elem_ind);
ub1 *big_int = (ub1 *) malloc(big_intl * (sizeof(ub1)));
memset((void *) big_int, 0, big_intl);
oratext *name = (oratext *) malloc(namel * (sizeof(oratext)));
memset((void *) name, 0, namel);
okvCustomAttrGetBigInteger(env, ttlv, elem_ind, name, &namel,
big_int, &big_intl, &attr_index);
for (i = 0; i < big_intl; i++)
{
printf ("%02x", *(big_int + i));
}
...
free(name);
free(big_int);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Custom Attribute APIs
12.2.14 okvCustomAttrGetBigIntegerLen
okvCustomAttrGetBigIntegerLen returns the length of the big
integer data found at element index elem_ind in the custom attribute
specified by the OKVTTLV parent object.
Category
KMIP custom attributes API
Purpose
okvCustomAttrGetBigIntegerLen returns the length of the
big integer data found at element index elem_ind in the custom
attribute specified by the OKVTTLV parent object.
Syntax
ub4 okvCustomAttrGetBigIntegerLen(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 big integer data type attribute value. Failure: |
Supported Versions:
Oracle Key Vault C SDK version 21.8.0.0.0 and later.
Comments
None.
Example
OKVTTLV *attrs = (OKVTTLV *)NULL; oratext *attr_name_list[1]; attr_name_list[0] = "x-My Big Integer"; ub4 len = 0, elem_ind = 0; ... okvGetAttributes(env, uid, 1, (oratext **) attr_name_list, &attrs); len = okvCustomAttrGetBigIntegerLen(env, attrs, elem_ind);
Related Topics
Parent topic: Oracle Key Vault Client SDK KMIP Custom Attribute APIs
12.2.15 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 Client SDK KMIP Custom Attribute APIs
12.2.16 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 Client SDK KMIP Custom Attribute APIs
12.2.17 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 Client SDK KMIP Custom Attribute APIs
12.2.18 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 Client SDK KMIP Custom Attribute APIs
12.2.19 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 Client SDK KMIP Custom Attribute APIs
12.2.20 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 Client SDK KMIP Custom Attribute APIs
12.2.21 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 Client SDK KMIP Custom Attribute APIs
12.2.22 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 Client SDK KMIP Custom Attribute APIs
12.2.23 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 Client SDK KMIP Custom Attribute APIs
12.2.24 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 Client SDK KMIP Custom Attribute APIs
12.2.25 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 Client SDK KMIP Custom Attribute APIs
12.2.26 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 Client SDK KMIP Custom Attribute APIs
12.2.27 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 Client SDK KMIP Custom Attribute APIs