KNX IoT
KNX IoT Point API stack implementation
oc_cred.h File Reference

security credentials. More...

#include "oc_ri.h"
#include "oc_uuid.h"
#include "util/oc_list.h"

Go to the source code of this file.

Data Structures

struct  oc_cred_data_t
 credential data info More...
 
struct  oc_sec_cred_t
 security credential information More...
 
struct  oc_sec_creds_t
 credential and rowner information More...
 

Typedefs

typedef struct oc_cred_data_t oc_cred_data_t
 credential data info More...
 
typedef struct oc_sec_cred_t oc_sec_cred_t
 security credential information More...
 
typedef struct oc_sec_creds_t oc_sec_creds_t
 credential and rowner information More...
 
typedef enum oc_sec_credtype_t oc_sec_credtype_t
 credential type information More...
 
typedef enum oc_sec_credusage_t oc_sec_credusage_t
 credential usage More...
 
typedef enum oc_sec_encoding_t oc_sec_encoding_t
 Security encoding information. More...
 

Enumerations

enum  oc_sec_credtype_t {
  OC_CREDTYPE_NULL = 0 , OC_CREDTYPE_PSK = 1 , OC_CREDTYPE_CERT = 8 , OC_CREDTYPE_OSCORE = 64 ,
  OC_CREDTYPE_OSCORE_MCAST_CLIENT = 128 , OC_CREDTYPE_OSCORE_MCAST_SERVER = 256
}
 credential type information More...
 
enum  oc_sec_credusage_t {
  OC_CREDUSAGE_NULL = 0 , OC_CREDUSAGE_TRUSTCA = 1 << 1 , OC_CREDUSAGE_IDENTITY_CERT = 1 << 2 , OC_CREDUSAGE_ROLE_CERT = 1 << 3 ,
  OC_CREDUSAGE_MFG_TRUSTCA , OC_CREDUSAGE_MFG_CERT = 1 << 5
}
 credential usage More...
 
enum  oc_sec_encoding_t {
  OC_ENCODING_UNSUPPORTED = 0 , OC_ENCODING_BASE64 , OC_ENCODING_RAW , OC_ENCODING_PEM ,
  OC_ENCODING_HANDLE
}
 Security encoding information. More...
 

Functions

const char * oc_cred_credtype_string (oc_sec_credtype_t credtype)
 credential type to string More...
 
oc_sec_credusage_t oc_cred_parse_credusage (oc_string_t *credusage_string)
 parse credential string to type More...
 
oc_sec_encoding_t oc_cred_parse_encoding (oc_string_t *encoding_string)
 parse credential encoding string to type More...
 
const char * oc_cred_read_credusage (oc_sec_credusage_t credusage)
 read credential usage More...
 
const char * oc_cred_read_encoding (oc_sec_encoding_t encoding)
 read credential encoding More...
 

Detailed Description

security credentials.

Definition in file oc_cred.h.

Typedef Documentation

◆ oc_cred_data_t

credential data info

◆ oc_sec_cred_t

typedef struct oc_sec_cred_t oc_sec_cred_t

security credential information

◆ oc_sec_creds_t

credential and rowner information

◆ oc_sec_credtype_t

credential type information

◆ oc_sec_credusage_t

credential usage

◆ oc_sec_encoding_t

Security encoding information.

Enumeration Type Documentation

◆ oc_sec_credtype_t

credential type information

Enumerator
OC_CREDTYPE_NULL 

no credential

OC_CREDTYPE_PSK 

PSK (personal)

Definition at line 35 of file oc_cred.h.

35  {
36  OC_CREDTYPE_NULL = 0,
37  OC_CREDTYPE_PSK = 1,
38  OC_CREDTYPE_CERT = 8,
39  OC_CREDTYPE_OSCORE = 64,
40  OC_CREDTYPE_OSCORE_MCAST_CLIENT = 128,
41  OC_CREDTYPE_OSCORE_MCAST_SERVER = 256
oc_sec_credtype_t
credential type information
Definition: oc_cred.h:35
@ OC_CREDTYPE_NULL
no credential
Definition: oc_cred.h:36
@ OC_CREDTYPE_PSK
PSK (personal)
Definition: oc_cred.h:37

◆ oc_sec_credusage_t

credential usage

Enumerator
OC_CREDUSAGE_NULL 

no usage

OC_CREDUSAGE_TRUSTCA 

trust anchor oic.sec.cred.trustca

OC_CREDUSAGE_IDENTITY_CERT 

Certificate oic.sec.cred.cert.

OC_CREDUSAGE_ROLE_CERT 

Role Certificate oic.sec.cred.rolecert.

OC_CREDUSAGE_MFG_TRUSTCA 

Manufacturer Trust CA oic.sec.cred.mfgtrustca.

OC_CREDUSAGE_MFG_CERT 

Manufacturer CA oic.sec.cred.mfgcert.

Definition at line 48 of file oc_cred.h.

48  {
49  OC_CREDUSAGE_NULL = 0,
50  OC_CREDUSAGE_TRUSTCA = 1 << 1,
52  OC_CREDUSAGE_ROLE_CERT = 1 << 3,
54  1 << 4,
55  OC_CREDUSAGE_MFG_CERT = 1 << 5
oc_sec_credusage_t
credential usage
Definition: oc_cred.h:48
@ OC_CREDUSAGE_TRUSTCA
trust anchor oic.sec.cred.trustca
Definition: oc_cred.h:50
@ OC_CREDUSAGE_MFG_TRUSTCA
Manufacturer Trust CA oic.sec.cred.mfgtrustca.
Definition: oc_cred.h:53
@ OC_CREDUSAGE_NULL
no usage
Definition: oc_cred.h:49
@ OC_CREDUSAGE_IDENTITY_CERT
Certificate oic.sec.cred.cert.
Definition: oc_cred.h:51
@ OC_CREDUSAGE_MFG_CERT
Manufacturer CA oic.sec.cred.mfgcert.
Definition: oc_cred.h:55
@ OC_CREDUSAGE_ROLE_CERT
Role Certificate oic.sec.cred.rolecert.
Definition: oc_cred.h:52

◆ oc_sec_encoding_t

Security encoding information.

Enumerator
OC_ENCODING_UNSUPPORTED 

not supported

OC_ENCODING_BASE64 

oic.sec.encoding.base64

OC_ENCODING_RAW 

oic.sec.encoding.raw

OC_ENCODING_PEM 

oic.sec.encoding.pem

OC_ENCODING_HANDLE 

oic.sec.encoding.handle – Data is contained in a storage sub-system referenced using a handle

Definition at line 62 of file oc_cred.h.

62  {
oc_sec_encoding_t
Security encoding information.
Definition: oc_cred.h:62
@ OC_ENCODING_PEM
oic.sec.encoding.pem
Definition: oc_cred.h:66
@ OC_ENCODING_UNSUPPORTED
not supported
Definition: oc_cred.h:63
@ OC_ENCODING_BASE64
oic.sec.encoding.base64
Definition: oc_cred.h:64
@ OC_ENCODING_RAW
oic.sec.encoding.raw
Definition: oc_cred.h:65
@ OC_ENCODING_HANDLE
oic.sec.encoding.handle – Data is contained in a storage sub-system referenced using a handle
Definition: oc_cred.h:67

Function Documentation

◆ oc_cred_credtype_string()

const char* oc_cred_credtype_string ( oc_sec_credtype_t  credtype)

credential type to string

Parameters
credtypethe credential type as type
Returns
const char* credential type as string

◆ oc_cred_parse_credusage()

oc_sec_credusage_t oc_cred_parse_credusage ( oc_string_t *  credusage_string)

parse credential string to type

Parameters
credusage_stringcredential usage as string
Returns
oc_sec_credusage_t credential usage type

◆ oc_cred_parse_encoding()

oc_sec_encoding_t oc_cred_parse_encoding ( oc_string_t *  encoding_string)

parse credential encoding string to type

Parameters
encoding_stringcredential encoding string
Returns
oc_sec_encoding_t credential encoding type

◆ oc_cred_read_credusage()

const char* oc_cred_read_credusage ( oc_sec_credusage_t  credusage)

read credential usage

Parameters
credusagecredential usage as type
Returns
const char* credential usage as string

◆ oc_cred_read_encoding()

const char* oc_cred_read_encoding ( oc_sec_encoding_t  encoding)

read credential encoding

Parameters
encodingcredential encoding as type
Returns
const char* credential encoding as string