Created SILC Crypto Toolkit git repository.
[crypto.git] / lib / silcasn1 / silcber.c
index 9d83d8b56e43fb08329fe70f1f828aaa20f94a15..ee159669fb1a518522deb59e94633a99cebf2fc9 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2003 - 2005 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
@@ -18,7 +18,7 @@
 */
 /* Basic Encoding Rules (BER) encoder and decoder. */
 
-#include "silc.h"
+#include "silccrypto.h"
 #include "silcber.h"
 
 /* Encodes a BER data block into the `ber', which must already have
@@ -75,7 +75,7 @@ SilcBool silc_ber_encode(SilcBuffer ber, SilcBerClass ber_class,
       /* Long form */
 
       /* Calculate the number of octets for the length field */
-      tmp = tag;
+      tmp = data_len;
       c = 0;
       while (tmp) {
        c++;