New SILC PKCS API, enabling support for other public keys/certs.
[silc.git] / lib / silcasn1 / silcber.c
index 9d83d8b56e43fb08329fe70f1f828aaa20f94a15..e6f2de30a864ba1b55a9f968e4d8ec480e456562 100644 (file)
@@ -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++;