X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcasn1%2Fsilcasn1_encode.c;h=5b4c00713fb9b971f39724fa993acb9141e2a485;hb=9b499de7f8fdbb24c32b8a0a84bb2fbbcdab782a;hp=f2cf80c714d0a66bf9031669bc58f9e57797e7c1;hpb=524dff836509afe72184a51bb55818377c3232e1;p=crypto.git diff --git a/lib/silcasn1/silcasn1_encode.c b/lib/silcasn1/silcasn1_encode.c index f2cf80c7..5b4c0071 100644 --- a/lib/silcasn1/silcasn1_encode.c +++ b/lib/silcasn1/silcasn1_encode.c @@ -4,7 +4,7 @@ Author: Pekka Riikonen - Copyright (C) 2003 - 2007 Pekka Riikonen + Copyright (C) 2003 - 2008 Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,7 +17,7 @@ */ -#include "silc.h" +#include "silccrypto.h" #include "silcasn1.h" #include "silcber.h" @@ -189,7 +189,7 @@ silc_asn1_encoder(SilcAsn1 asn1, SilcStack stack1, SilcStack stack2, SILC_LOG_DEBUG(("Error decoding underlaying node for ANY")); goto fail; } - assert(enc == SILC_BER_ENC_CONSTRUCTED); + SILC_VERIFY(enc == SILC_BER_ENC_CONSTRUCTED); /* Now encode with implicit tagging */ len = silc_ber_encoded_len(tag, d_len, FALSE); @@ -352,7 +352,7 @@ silc_asn1_encoder(SilcAsn1 asn1, SilcStack stack1, SilcStack stack2, /* Get OID words from the string */ cp = strchr(oidstr, '.'); while (cp) { - if (sscanf(oidstr, "%lu", (unsigned long *)&oid) != 1) { + if (sscanf(oidstr, "%lu", &oid) != 1) { SILC_LOG_DEBUG(("Malformed OID string")); goto fail; } @@ -363,7 +363,7 @@ silc_asn1_encoder(SilcAsn1 asn1, SilcStack stack1, SilcStack stack2, cp = strchr(oidstr, '.'); if (!cp) { - if (sscanf(oidstr, "%lu", (unsigned long *)&oid) != 1) { + if (sscanf(oidstr, "%lu", &oid) != 1) { SILC_LOG_DEBUG(("Malformed OID string")); goto fail; } @@ -485,7 +485,7 @@ silc_asn1_encoder(SilcAsn1 asn1, SilcStack stack1, SilcStack stack2, /* Encode empty BER block */ SilcBool val = va_arg(asn1->ap, SilcUInt32); - assert(indef == FALSE); + SILC_VERIFY(indef == FALSE); if (!val) break;