Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix windows bustage
--HG--
extra : amend_source : 416fae1b2a699b9e79707abe1b6375be2671a711
  • Loading branch information
franziskuskiefer committed Mar 23, 2017
1 parent 9a32582 commit 2dfad04
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions gtests/der_gtest/der_quickder_unittest.cc
Expand Up @@ -15,6 +15,10 @@
#include "secerr.h"
#include "secitem.h"

const SEC_ASN1Template mySEC_NullTemplate[] = {
{ SEC_ASN1_NULL, 0, NULL, sizeof(SECItem) }
};

namespace nss_test {

class QuickDERTest : public ::testing::Test,
Expand Down Expand Up @@ -67,9 +71,9 @@ TEST_P(QuickDERTest, InvalidLengths) {
PORT_InitCheapArena(&pool, DER_DEFAULT_CHUNKSIZE);
ScopedSECItem parsed_value(SECITEM_AllocItem(nullptr, nullptr, 0U));
ASSERT_TRUE(parsed_value);
ASSERT_EQ(SECFailure, SEC_QuickDERDecodeItem(&pool.arena, parsed_value.get(),
SEC_ASN1_SUB(SEC_NullTemplate),
copy_of_input.get()));
ASSERT_EQ(SECFailure,
SEC_QuickDERDecodeItem(&pool.arena, parsed_value.get(),
mySEC_NullTemplate, copy_of_input.get()));
ASSERT_EQ(SEC_ERROR_BAD_DER, PR_GetError());
PORT_DestroyCheapArena(&pool);
}
Expand Down

0 comments on commit 2dfad04

Please sign in to comment.