Updates
Correct the tag number to match latest draft
clean up compiler error?
diff --git a/dumper/dumper.c b/dumper/dumper.c
index de87c94..c4539b5 100644
--- a/dumper/dumper.c
+++ b/dumper/dumper.c
@@ -515,10 +515,10 @@
if (root == NULL) {
if (cbor->type == CN_CBOR_TAG) {
switch (cbor->v.sint) {
- case 999: root = &SignedMessageWithTag; break;
- case 998: root = &EnvelopedMessageWithTag; break;
- case 997: root = &EncryptedMessageWithTag; break;
- case 996: root = &MacMessageWithTag; break;
+ case 991: root = &SignedMessageWithTag; break;
+ case 992: root = &EnvelopedMessageWithTag; break;
+ case 993: root = &EncryptedMessageWithTag; break;
+ case 994: root = &MacMessageWithTag; break;
}
}
}
diff --git a/src/Recipient.c b/src/Recipient.c
index d324b39..b66ffd9 100644
--- a/src/Recipient.c
+++ b/src/Recipient.c
@@ -73,11 +73,10 @@
return _COSE_Encrypt_decrypt(&pRecip->m_encrypt, NULL, cbitKey, pbKey, perr);
}
-
-byte * _COSE_RecipientInfo_generateKey(COSE_RecipientInfo * pRecipient, size_t cbitKeySize)
+byte * _COSE_RecipientInfo_generateKey(COSE_RecipientInfo * pRecipient, size_t cbitKeySize, cose_errback * perr)
{
int alg;
- const cn_cbor * cn_Alg = _COSE_map_get_int(&pRecipient->m_encrypt.m_message, COSE_Header_Algorithm, COSE_BOTH, NULL);
+ const cn_cbor * cn_Alg = _COSE_map_get_int(&pRecipient->m_encrypt.m_message, COSE_Header_Algorithm, COSE_BOTH, perr);
if (cn_Alg == NULL) return false;
if ((cn_Alg->type != CN_CBOR_UINT) && (cn_Alg->type != CN_CBOR_INT)) return false;