changing {} style to match majority of previous style

This commit is contained in:
Philippe Teuwen 2019-03-10 11:20:22 +01:00
commit 961d929f4d
320 changed files with 5502 additions and 10485 deletions

View file

@ -38,16 +38,14 @@ COSEValueNameDesc_t COSEKeyTypeValueDesc[] = {
{4, "Symmetric", "Symmetric Key"},
};
COSEValueNameDesc_t *GetCOSEktyElm(int id)
{
COSEValueNameDesc_t *GetCOSEktyElm(int id) {
for (int i = 0; i < ARRAYLEN(COSEKeyTypeValueDesc); i++)
if (COSEKeyTypeValueDesc[i].Value == id)
return &COSEKeyTypeValueDesc[i];
return NULL;
}
const char *GetCOSEktyDescription(int id)
{
const char *GetCOSEktyDescription(int id) {
COSEValueNameDesc_t *elm = GetCOSEktyElm(id);
if (elm)
return elm->Description;
@ -65,16 +63,14 @@ COSEValueTypeNameDesc_t COSECurvesDesc[] = {
{7, "OKP", "Ed448", "Ed448 for use w/ EdDSA only"},
};
COSEValueTypeNameDesc_t *GetCOSECurveElm(int id)
{
COSEValueTypeNameDesc_t *GetCOSECurveElm(int id) {
for (int i = 0; i < ARRAYLEN(COSECurvesDesc); i++)
if (COSECurvesDesc[i].Value == id)
return &COSECurvesDesc[i];
return NULL;
}
const char *GetCOSECurveDescription(int id)
{
const char *GetCOSECurveDescription(int id) {
COSEValueTypeNameDesc_t *elm = GetCOSECurveElm(id);
if (elm)
return elm->Description;
@ -139,32 +135,28 @@ COSEValueNameDesc_t COSEAlg[] = {
{33, "AES-CCM-64-128-256", "AES-CCM mode 256-bit key, 128-bit tag, 7-byte nonce"}
};
COSEValueNameDesc_t *GetCOSEAlgElm(int id)
{
COSEValueNameDesc_t *GetCOSEAlgElm(int id) {
for (int i = 0; i < ARRAYLEN(COSEAlg); i++)
if (COSEAlg[i].Value == id)
return &COSEAlg[i];
return NULL;
}
const char *GetCOSEAlgName(int id)
{
const char *GetCOSEAlgName(int id) {
COSEValueNameDesc_t *elm = GetCOSEAlgElm(id);
if (elm)
return elm->Name;
return COSEEmptyStr;
}
const char *GetCOSEAlgDescription(int id)
{
const char *GetCOSEAlgDescription(int id) {
COSEValueNameDesc_t *elm = GetCOSEAlgElm(id);
if (elm)
return elm->Description;
return COSEEmptyStr;
}
int COSEGetECDSAKey(uint8_t *data, size_t datalen, bool verbose, uint8_t *public_key)
{
int COSEGetECDSAKey(uint8_t *data, size_t datalen, bool verbose, uint8_t *public_key) {
CborParser parser;
CborValue map;
int64_t i64;