From 366f42a91befa27fb8cd00dc2187605a0204d046 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Thu, 16 Jan 2014 17:45:10 -0700 Subject: [PATCH] remove NULL tag from block cipher AlgoId, IV there instead --- ctaocrypt/src/asn.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ctaocrypt/src/asn.c b/ctaocrypt/src/asn.c index 7e73db492..29c54fc1c 100644 --- a/ctaocrypt/src/asn.c +++ b/ctaocrypt/src/asn.c @@ -2387,11 +2387,10 @@ CYASSL_LOCAL word32 SetAlgoID(int algoOID, byte* output, int type, int curveSz) static const byte md2AlgoID[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x02, 0x02, 0x05, 0x00}; - /* blkTypes */ - static const byte desCbcAlgoID[] = { 0x2B, 0x0E, 0x03, 0x02, 0x07, - 0x05, 0x00 }; + /* blkTypes, no NULL tags because IV is there instead */ + static const byte desCbcAlgoID[] = { 0x2B, 0x0E, 0x03, 0x02, 0x07 }; static const byte des3CbcAlgoID[] = { 0x2A, 0x86, 0x48, 0x86, 0xF7, - 0x0D, 0x03, 0x07, 0x05, 0x00}; + 0x0D, 0x03, 0x07 }; /* RSA sigTypes */ #ifndef NO_RSA @@ -2481,10 +2480,12 @@ CYASSL_LOCAL word32 SetAlgoID(int algoOID, byte* output, int type, int curveSz) case DESb: algoSz = sizeof(desCbcAlgoID); algoName = desCbcAlgoID; + tagSz = 0; break; case DES3b: algoSz = sizeof(des3CbcAlgoID); algoName = des3CbcAlgoID; + tagSz = 0; break; default: CYASSL_MSG("Unknown Block Algo");