diff --git a/.gitignore b/.gitignore
index 0f5039b..d10d5a1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-SOURCES/libtasn1-3.8.tar.gz
+SOURCES/libtasn1-4.10.tar.gz
diff --git a/.libtasn1.metadata b/.libtasn1.metadata
index 7e35b37..8a40e10 100644
--- a/.libtasn1.metadata
+++ b/.libtasn1.metadata
@@ -1 +1 @@
-ffa122634ea8cd108e613d3e23c76db6f21ff621 SOURCES/libtasn1-3.8.tar.gz
+c7b36fa50866bbc889f7503c7fd1e9f9d7c52a64 SOURCES/libtasn1-4.10.tar.gz
diff --git a/SOURCES/libtasn1-3.8-decoding-long-oid.patch b/SOURCES/libtasn1-3.8-decoding-long-oid.patch
deleted file mode 100644
index 69ee123..0000000
--- a/SOURCES/libtasn1-3.8-decoding-long-oid.patch
+++ /dev/null
@@ -1,319 +0,0 @@
-diff --git a/lib/coding.c b/lib/coding.c
-index d6b7cf4..080be6d 100644
---- a/lib/coding.c
-+++ b/lib/coding.c
-@@ -337,7 +337,7 @@ _asn1_objectid_der (unsigned char *str, unsigned char *der, int *der_len)
-   int len_len, counter, k, first, max_len;
-   char *temp, *n_end, *n_start;
-   unsigned char bit7;
--  unsigned long val, val1 = 0;
-+  uint64_t val, val1 = 0;
-   int str_len = _asn1_strlen (str);
- 
-   max_len = *der_len;
-@@ -355,7 +355,7 @@ _asn1_objectid_der (unsigned char *str, unsigned char *der, int *der_len)
-   while ((n_end = strchr (n_start, '.')))
-     {
-       *n_end = 0;
--      val = strtoul (n_start, NULL, 10);
-+      val = _asn1_strtou64 (n_start, NULL, 10);
-       counter++;
- 
-       if (counter == 1)
-@@ -369,7 +369,7 @@ _asn1_objectid_der (unsigned char *str, unsigned char *der, int *der_len)
-       else
- 	{
- 	  first = 0;
--	  for (k = 4; k >= 0; k--)
-+	  for (k = sizeof(val); k >= 0; k--)
- 	    {
- 	      bit7 = (val >> (k * 7)) & 0x7F;
- 	      if (bit7 || first || !k)
-diff --git a/lib/decoding.c b/lib/decoding.c
-index 64cc290..0ee6bc4 100644
---- a/lib/decoding.c
-+++ b/lib/decoding.c
-@@ -302,7 +302,7 @@ _asn1_get_objectid_der (const unsigned char *der, int der_len, int *ret_len,
-   int len_len, len, k;
-   int leading;
-   char temp[LTOSTR_MAX_SIZE];
--  unsigned long val, val1;
-+  uint64_t val, val1;
- 
-   *ret_len = 0;
-   if (str && str_size > 0)
-diff --git a/lib/int.h b/lib/int.h
-index 3701e5f..c950932 100644
---- a/lib/int.h
-+++ b/lib/int.h
-@@ -106,6 +106,12 @@ extern const tag_and_class_st _asn1_tags[];
- #define _asn1_strcpy(a,b) strcpy((char *)a, (const char *)b)
- #define _asn1_strcat(a,b) strcat((char *)a, (const char *)b)
- 
-+#if SIZEOF_UNSIGNED_LONG_INT == 8
-+# define _asn1_strtou64(n,e,b) strtoul((const char *) n, e, b)
-+#else
-+# define _asn1_strtou64(n,e,b) strtoull((const char *) n, e, b)
-+#endif
-+
- #define MAX_LOG_SIZE 1024	/* maximum number of characters of a log message */
- 
- /* Define used for visiting trees. */
-diff --git a/lib/parser_aux.c b/lib/parser_aux.c
-index effedb2..91a1ef8 100644
---- a/lib/parser_aux.c
-+++ b/lib/parser_aux.c
-@@ -533,9 +533,9 @@ _asn1_delete_list_and_nodes (void)
- 
- 
- char *
--_asn1_ltostr (long v, char *str)
-+_asn1_ltostr (int64_t v, char *str)
- {
--  long d, r;
-+  int64_t d, r;
-   char temp[LTOSTR_MAX_SIZE];
-   int count, k, start;
- 
-diff --git a/lib/parser_aux.h b/lib/parser_aux.h
-index 1f1aec2..f50a639 100644
---- a/lib/parser_aux.h
-+++ b/lib/parser_aux.h
-@@ -53,7 +53,7 @@ void _asn1_delete_list (void);
- void _asn1_delete_list_and_nodes (void);
- 
- #define LTOSTR_MAX_SIZE 20
--char *_asn1_ltostr (long v, char *str);
-+char *_asn1_ltostr (int64_t v, char *str);
- 
- asn1_node _asn1_find_up (asn1_node node);
- 
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index d28656d..31c20ba 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
-@@ -35,11 +35,11 @@ MOSTLYCLEANFILES = Test_parser_ERROR.asn
- 
- check_PROGRAMS = Test_parser Test_tree Test_encoding Test_indefinite \
- 	Test_errors Test_simple Test_overflow Test_strings Test_choice \
--	Test_encdec
-+	Test_encdec coding-long-oid
- 
- TESTS = Test_parser Test_tree Test_encoding Test_indefinite	\
- 	Test_errors Test_simple Test_overflow crlf threadsafety \
--	Test_strings Test_choice Test_encdec
-+	Test_strings Test_choice Test_encdec coding-long-oid
- 
- TESTS_ENVIRONMENT = \
- 	ASN1PARSER=$(srcdir)/Test_parser.asn \
-diff --git a/tests/coding-long-oid.c b/tests/coding-long-oid.c
-new file mode 100644
-index 0000000..bc2cd56
---- /dev/null
-+++ b/tests/coding-long-oid.c
-@@ -0,0 +1,205 @@
-+/*
-+ * Copyright (C) 2016 Free Software Foundation, Inc.
-+ *
-+ * This file is part of LIBTASN1.
-+ *
-+ * 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
-+ * the Free Software Foundation, either version 3 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+ *
-+ */
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <libtasn1.h>
-+
-+/* This checks the decoding and re-encoding of OIDs which contain elements
-+ * >= 2^32 bits.
-+ */
-+
-+const unsigned char der_data[] =
-+	"\x30\x82\x06\xdc\x30\x82\x05\xc4\xa0\x03\x02\x01\x02\x02\x08\x35"
-+	"\x73\x8c\xaf\x21\xea\xbd\x2d\x30\x0d\x06\x09\x2a\x86\x48\x86\xf7"
-+	"\x0d\x01\x01\x05\x05\x00\x30\x81\x8e\x31\x0b\x30\x09\x06\x03\x55"
-+	"\x04\x06\x13\x02\x55\x53\x31\x17\x30\x15\x06\x03\x55\x04\x08\x13"
-+	"\x0e\x4e\x6f\x72\x74\x68\x20\x43\x61\x72\x6f\x6c\x69\x6e\x61\x31"
-+	"\x10\x30\x0e\x06\x03\x55\x04\x07\x13\x07\x52\x61\x6c\x65\x69\x67"
-+	"\x68\x31\x10\x30\x0e\x06\x03\x55\x04\x0a\x13\x07\x4b\x61\x74\x65"
-+	"\x6c\x6c\x6f\x31\x14\x30\x12\x06\x03\x55\x04\x0b\x13\x0b\x53\x6f"
-+	"\x6d\x65\x4f\x72\x67\x55\x6e\x69\x74\x31\x2c\x30\x2a\x06\x03\x55"
-+	"\x04\x03\x13\x23\x73\x61\x74\x2d\x72\x32\x32\x30\x2d\x31\x30\x2e"
-+	"\x6c\x61\x62\x2e\x65\x6e\x67\x2e\x72\x64\x75\x32\x2e\x72\x65\x64"
-+	"\x68\x61\x74\x2e\x63\x6f\x6d\x30\x1e\x17\x0d\x31\x36\x30\x37\x30"
-+	"\x31\x31\x38\x35\x34\x31\x37\x5a\x17\x0d\x34\x39\x31\x32\x30\x31"
-+	"\x31\x33\x30\x30\x30\x30\x5a\x30\x2b\x31\x29\x30\x27\x06\x03\x55"
-+	"\x04\x03\x13\x20\x38\x61\x38\x38\x38\x30\x31\x37\x35\x35\x61\x37"
-+	"\x63\x39\x30\x37\x30\x31\x35\x35\x61\x37\x63\x66\x62\x65\x33\x36"
-+	"\x30\x30\x30\x34\x30\x82\x01\x22\x30\x0d\x06\x09\x2a\x86\x48\x86"
-+	"\xf7\x0d\x01\x01\x01\x05\x00\x03\x82\x01\x0f\x00\x30\x82\x01\x0a"
-+	"\x02\x82\x01\x01\x00\xdc\x70\x8b\x9c\x84\xe9\x3e\x79\x8f\x03\xe5"
-+	"\x5f\x21\xf0\x29\x9e\xd9\x94\x4e\x0f\x37\x45\x47\x42\xda\x2a\xe0"
-+	"\xda\xf5\x8b\xfa\xe1\xf8\x62\x51\x14\x9d\x9e\xe0\xc7\x69\xd0\x3d"
-+	"\xfc\x25\x2f\xb6\x10\x45\xbd\x0d\xbc\x92\x86\x54\xbb\x4e\x7d\xd4"
-+	"\x92\x75\x65\xba\x48\xa4\x64\xa1\xeb\xf7\xe7\xdc\xc0\xd7\x0a\x5e"
-+	"\x36\x13\x0e\x4e\x35\xcc\x2c\xc6\xf3\xe7\xe7\xe5\x32\x8a\x0c\xf7"
-+	"\x47\x28\x7a\x02\xc2\x68\x66\x19\x3a\xba\xca\x31\xe2\xdd\x43\xbe"
-+	"\x26\x4c\x80\x12\x0c\xae\x44\x40\xeb\x69\x7d\x9e\x58\xd3\xab\xaf"
-+	"\x69\xe6\x54\xae\x7d\x80\xee\x2c\x10\xe9\xbb\x5e\x6b\x89\x15\x2e"
-+	"\x2c\x72\x26\xba\x7f\xe5\xa3\x66\xc5\x98\xc6\x57\xbf\x05\x1e\x55"
-+	"\x93\xa6\x16\x83\xa6\x88\x79\x8f\x4e\xb5\x7e\x70\xeb\xf0\xa9\xa6"
-+	"\xd5\xf9\x1f\xe6\xab\x70\x06\x43\xe0\xde\x82\xad\x0e\x04\x17\x2b"
-+	"\x69\x82\x40\x98\x84\x14\x00\x2a\xa2\xda\x61\x7b\x35\xac\x71\x05"
-+	"\x43\x6f\x55\x3a\x28\x4b\xd1\xa4\xeb\x3b\xf5\x03\xc2\xf8\x3c\xfd"
-+	"\x0a\xc4\x99\x1d\xa7\x7d\x08\x5c\xd1\x15\x70\x73\xb9\xdc\x5c\xf2"
-+	"\xfe\x2c\xc6\x21\x8a\xbe\xbd\x52\x37\x64\x04\xe5\x06\x3e\xc6\x62"
-+	"\xa1\xe9\x8e\xcb\xc1\x02\x03\x01\x00\x01\xa3\x82\x03\x9e\x30\x82"
-+	"\x03\x9a\x30\x11\x06\x09\x60\x86\x48\x01\x86\xf8\x42\x01\x01\x04"
-+	"\x04\x03\x02\x05\xa0\x30\x0b\x06\x03\x55\x1d\x0f\x04\x04\x03\x02"
-+	"\x04\xb0\x30\x81\xc3\x06\x03\x55\x1d\x23\x04\x81\xbb\x30\x81\xb8"
-+	"\x80\x14\xca\xca\x62\x86\x04\x05\xf0\xf5\x9b\x38\xd2\x2c\x3c\x8c"
-+	"\x65\x0f\xc6\xba\xa5\x3c\xa1\x81\x94\xa4\x81\x91\x30\x81\x8e\x31"
-+	"\x0b\x30\x09\x06\x03\x55\x04\x06\x13\x02\x55\x53\x31\x17\x30\x15"
-+	"\x06\x03\x55\x04\x08\x13\x0e\x4e\x6f\x72\x74\x68\x20\x43\x61\x72"
-+	"\x6f\x6c\x69\x6e\x61\x31\x10\x30\x0e\x06\x03\x55\x04\x07\x13\x07"
-+	"\x52\x61\x6c\x65\x69\x67\x68\x31\x10\x30\x0e\x06\x03\x55\x04\x0a"
-+	"\x13\x07\x4b\x61\x74\x65\x6c\x6c\x6f\x31\x14\x30\x12\x06\x03\x55"
-+	"\x04\x0b\x13\x0b\x53\x6f\x6d\x65\x4f\x72\x67\x55\x6e\x69\x74\x31"
-+	"\x2c\x30\x2a\x06\x03\x55\x04\x03\x13\x23\x73\x61\x74\x2d\x72\x32"
-+	"\x32\x30\x2d\x31\x30\x2e\x6c\x61\x62\x2e\x65\x6e\x67\x2e\x72\x64"
-+	"\x75\x32\x2e\x72\x65\x64\x68\x61\x74\x2e\x63\x6f\x6d\x82\x09\x00"
-+	"\xa4\xe7\xca\xeb\xbe\x43\x5d\xcc\x30\x1d\x06\x03\x55\x1d\x0e\x04"
-+	"\x16\x04\x14\x0e\x8d\x7b\x53\xba\x5a\x9e\x92\x44\xe5\x64\x58\xa1"
-+	"\xdb\x83\x47\x05\x3e\x32\xd3\x30\x13\x06\x03\x55\x1d\x25\x04\x0c"
-+	"\x30\x0a\x06\x08\x2b\x06\x01\x05\x05\x07\x03\x02\x30\x2a\x06\x10"
-+	"\x2b\x06\x01\x04\x01\x92\x08\x09\x01\xaa\xda\xbe\xbe\xfa\x5b\x01"
-+	"\x04\x16\x0c\x14\x6d\x6f\x72\x64\x6f\x72\x5f\x75\x65\x62\x65\x72"
-+	"\x5f\x70\x72\x6f\x64\x75\x63\x74\x30\x16\x06\x10\x2b\x06\x01\x04"
-+	"\x01\x92\x08\x09\x01\xaa\xda\xbe\xbe\xfa\x5b\x03\x04\x02\x0c\x00"
-+	"\x30\x16\x06\x10\x2b\x06\x01\x04\x01\x92\x08\x09\x01\xaa\xda\xbe"
-+	"\xbe\xfa\x5b\x02\x04\x02\x0c\x00\x30\x16\x06\x10\x2b\x06\x01\x04"
-+	"\x01\x92\x08\x09\x01\xaa\xda\xbe\xbe\xfa\x5b\x05\x04\x02\x0c\x00"
-+	"\x30\x19\x06\x10\x2b\x06\x01\x04\x01\x92\x08\x09\x02\xaa\xda\xbe"
-+	"\xbe\xfa\x72\x01\x04\x05\x0c\x03\x79\x75\x6d\x30\x24\x06\x11\x2b"
-+	"\x06\x01\x04\x01\x92\x08\x09\x02\xaa\xda\xbe\xbe\xfa\x72\x01\x01"
-+	"\x04\x0f\x0c\x0d\x75\x65\x62\x65\x72\x5f\x63\x6f\x6e\x74\x65\x6e"
-+	"\x74\x30\x32\x06\x11\x2b\x06\x01\x04\x01\x92\x08\x09\x02\xaa\xda"
-+	"\xbe\xbe\xfa\x72\x01\x02\x04\x1d\x0c\x1b\x31\x34\x36\x37\x33\x39"
-+	"\x39\x32\x35\x37\x34\x33\x35\x5f\x75\x65\x62\x65\x72\x5f\x63\x6f"
-+	"\x6e\x74\x65\x6e\x74\x30\x1d\x06\x11\x2b\x06\x01\x04\x01\x92\x08"
-+	"\x09\x02\xaa\xda\xbe\xbe\xfa\x72\x01\x05\x04\x08\x0c\x06\x43\x75"
-+	"\x73\x74\x6f\x6d\x30\x1e\x06\x11\x2b\x06\x01\x04\x01\x92\x08\x09"
-+	"\x02\xaa\xda\xbe\xbe\xfa\x72\x01\x06\x04\x09\x0c\x07\x2f\x6d\x6f"
-+	"\x72\x64\x6f\x72\x30\x17\x06\x11\x2b\x06\x01\x04\x01\x92\x08\x09"
-+	"\x02\xaa\xda\xbe\xbe\xfa\x72\x01\x07\x04\x02\x0c\x00\x30\x18\x06"
-+	"\x11\x2b\x06\x01\x04\x01\x92\x08\x09\x02\xaa\xda\xbe\xbe\xfa\x72"
-+	"\x01\x08\x04\x03\x0c\x01\x31\x30\x24\x06\x0a\x2b\x06\x01\x04\x01"
-+	"\x92\x08\x09\x04\x01\x04\x16\x0c\x14\x6d\x6f\x72\x64\x6f\x72\x5f"
-+	"\x75\x65\x62\x65\x72\x5f\x70\x72\x6f\x64\x75\x63\x74\x30\x10\x06"
-+	"\x0a\x2b\x06\x01\x04\x01\x92\x08\x09\x04\x02\x04\x02\x0c\x00\x30"
-+	"\x1d\x06\x0a\x2b\x06\x01\x04\x01\x92\x08\x09\x04\x03\x04\x0f\x0c"
-+	"\x0d\x31\x34\x36\x37\x33\x39\x39\x32\x35\x37\x34\x33\x35\x30\x11"
-+	"\x06\x0a\x2b\x06\x01\x04\x01\x92\x08\x09\x04\x05\x04\x03\x0c\x01"
-+	"\x31\x30\x24\x06\x0a\x2b\x06\x01\x04\x01\x92\x08\x09\x04\x06\x04"
-+	"\x16\x0c\x14\x32\x30\x31\x36\x2d\x30\x37\x2d\x30\x31\x54\x31\x38"
-+	"\x3a\x35\x34\x3a\x31\x37\x5a\x30\x24\x06\x0a\x2b\x06\x01\x04\x01"
-+	"\x92\x08\x09\x04\x07\x04\x16\x0c\x14\x32\x30\x34\x39\x2d\x31\x32"
-+	"\x2d\x30\x31\x54\x31\x33\x3a\x30\x30\x3a\x30\x30\x5a\x30\x11\x06"
-+	"\x0a\x2b\x06\x01\x04\x01\x92\x08\x09\x04\x0c\x04\x03\x0c\x01\x30"
-+	"\x30\x11\x06\x0a\x2b\x06\x01\x04\x01\x92\x08\x09\x04\x0e\x04\x03"
-+	"\x0c\x01\x30\x30\x11\x06\x0a\x2b\x06\x01\x04\x01\x92\x08\x09\x04"
-+	"\x0b\x04\x03\x0c\x01\x31\x30\x34\x06\x0a\x2b\x06\x01\x04\x01\x92"
-+	"\x08\x09\x05\x01\x04\x26\x0c\x24\x39\x34\x35\x33\x66\x38\x65\x36"
-+	"\x2d\x38\x34\x62\x32\x2d\x34\x38\x32\x65\x2d\x61\x33\x65\x61\x2d"
-+	"\x30\x31\x63\x33\x62\x33\x65\x32\x36\x36\x61\x35\x30\x0d\x06\x09"
-+	"\x2a\x86\x48\x86\xf7\x0d\x01\x01\x05\x05\x00\x03\x82\x01\x01\x00"
-+	"\xf7\x4d\xf3\x30\x53\xcd\x35\xbf\x49\x07\x29\x9b\xf0\x7a\xaa\x49"
-+	"\x60\xda\xce\x14\x45\xb5\x32\x8f\xda\xc3\xce\x6b\xec\xbf\x20\xc0"
-+	"\x05\xa3\x3a\x89\xc4\x7d\x66\x34\xfc\xf3\x16\xb8\xf3\x03\xda\xfc"
-+	"\x82\x4a\xb8\x97\xf8\x67\x3d\xc2\x8c\x78\xb4\x6d\xb8\xbb\x18\xec"
-+	"\x36\xee\xc4\x28\x79\xda\xfe\xa1\x1f\xaf\x0b\x3f\xe4\x75\xde\x83"
-+	"\xff\x6b\xf9\x11\x60\x09\x57\xea\x85\x34\xed\x60\xe2\x94\x8b\xd6"
-+	"\xf2\x21\x9b\xda\x97\x99\xf3\x0d\xa9\x0f\xb5\x3b\x3a\x8f\x96\x8d"
-+	"\x0b\xdf\x30\x17\x03\xe6\x47\xc3\x71\x32\x09\x18\xbc\xc0\xa9\x83"
-+	"\x7e\xb7\x5f\x5c\xbb\xeb\x0a\x18\x3f\xa9\x40\x98\xae\x57\xab\x99"
-+	"\x3d\x47\x1b\x98\x8a\xdc\x6e\x85\xa2\xea\x5e\x21\x80\xa9\xb5\x48"
-+	"\xc9\x1d\x63\xc1\x1b\xe6\x01\xa1\xbd\x84\x38\x7f\x1a\x43\xa5\xd4"
-+	"\x7f\x41\x5b\xf6\x88\x33\xb0\xf1\xb8\x8f\xe1\x39\x69\x6f\x60\x13"
-+	"\xd3\x5d\x70\xde\x95\x0d\x2f\xa9\x89\x6c\xd4\x3a\xeb\x22\x59\xe6"
-+	"\x31\x67\x71\xa5\xed\xfb\xcb\x20\x11\x0c\x31\x2e\xe0\x98\x9a\x3b"
-+	"\x9c\x7b\xa2\x74\x6f\x87\x97\xa1\xd9\x82\x7f\x7d\x62\x6b\x45\x6c"
-+	"\x0b\x5e\x25\x43\x8a\x20\x16\x7d\xe5\x84\x18\x3f\x7c\xda\xfc\xf9";
-+
-+int der_data_size = sizeof(der_data)-1;
-+
-+char new_data[4*1024];
-+
-+int
-+main (int argc, char** argv)
-+{
-+  int result = 0;
-+  asn1_node definitions = NULL, node1 = NULL;
-+  char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE];
-+  const char *pkixfile = getenv ("ASN1PKIX");
-+  int new_data_size;
-+
-+  if (!pkixfile)
-+    pkixfile = "pkix.asn";
-+
-+  /* Encode */
-+  result = asn1_parser2tree (pkixfile, &definitions, errorDescription);
-+  if (result != ASN1_SUCCESS)
-+    {
-+      printf ("error in %d\n", __LINE__);
-+      exit (1);
-+    }
-+
-+  result = asn1_create_element (definitions, "PKIX1.Certificate", &node1);
-+  if (result != ASN1_SUCCESS)
-+    {
-+      printf ("error in %d\n", __LINE__);
-+      exit (1);
-+    }
-+
-+  result = asn1_der_decoding (&node1, der_data, der_data_size, errorDescription);
-+  if (result != ASN1_SUCCESS)
-+    {
-+      printf ("error in %d: %s\n", __LINE__, errorDescription);
-+      exit (1);
-+    }
-+
-+  new_data_size = sizeof(new_data);
-+  result = asn1_der_coding (node1, "", new_data, &new_data_size, errorDescription);
-+  if (result != ASN1_SUCCESS)
-+    {
-+      printf ("error in %d\n", __LINE__);
-+      exit (1);
-+    }
-+
-+  if (new_data_size != der_data_size)
-+    {
-+      printf ("error in %d\n", __LINE__);
-+      printf ("new_size is %d, expected: %d\n", new_data_size, der_data_size);
-+      exit (1);
-+    }
-+
-+  if (memcmp(new_data, der_data, der_data_size) != 0)
-+    {
-+      printf ("error in %d\n", __LINE__);
-+      exit (1);
-+    }
-+
-+  asn1_delete_structure (&node1);
-+  asn1_delete_structure (&definitions);
-+
-+  return 0;
-+}
diff --git a/SOURCES/libtasn1-3.8-octet-string.patch b/SOURCES/libtasn1-3.8-octet-string.patch
deleted file mode 100644
index a4a0c88..0000000
--- a/SOURCES/libtasn1-3.8-octet-string.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -ur libtasn1-3.8.orig/lib/decoding.c libtasn1-3.8/lib/decoding.c
---- libtasn1-3.8.orig/lib/decoding.c	2014-08-23 09:26:09.000000000 +0200
-+++ libtasn1-3.8/lib/decoding.c	2014-09-04 10:38:51.964592251 +0200
-@@ -720,6 +720,7 @@
- {
-   int len2, len3, counter, tot_len, indefinite;
-   int result;
-+  int orig_der_len = der_len;
- 
-   counter = 0;
- 
-@@ -777,7 +778,7 @@
- 	  asn1_length_der (tot_len, temp, &len2);
- 	  _asn1_set_value (node, temp, len2);
- 
--	  ret = _asn1_extract_der_octet (node, der, der_len);
-+	  ret = _asn1_extract_der_octet (node, der, orig_der_len);
- 	  if (ret != ASN1_SUCCESS)
- 	    return ret;
- 
diff --git a/SOURCES/libtasn1-3.8.tar.gz.sig b/SOURCES/libtasn1-3.8.tar.gz.sig
deleted file mode 100644
index 148ee26..0000000
--- a/SOURCES/libtasn1-3.8.tar.gz.sig
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1
-
-iQEcBAABAgAGBQJT+EPuAAoJEJ1eqvaQE7hCoA0IALISwNXNzlCOw0w5xKMj9Ofz
-W23+3oBphkzDJzuy7dDELh7F7GfweIOLZlBITsSByidBkm4CYJ2FktQI//bX6tfx
-rgsFEaI7oaJNwpDx4P0toN6nD9phSWXDIHlu541ka36qTwNMexj5VTr0nBbUCTIr
-KQhoZRZsMx8zWC1cnt8G8RgN7xwCJzr09Bfv4BlqKIQaxtU79GfqgO9bfwfKJHac
-OU2FB7LO9GZuioPxSwXjKgvXKOOJ0zqghHP4JCX1YsmaNzj4PVU8InD2tZuLJc+R
-1qqnczGLgyq1P/WsE5ODozbuYkDYYD2ENOuurild5vgHGgPZbYP4UCwSbSWDf/s=
-=kUxI
------END PGP SIGNATURE-----
diff --git a/SOURCES/libtasn1-4.10.tar.gz.sig b/SOURCES/libtasn1-4.10.tar.gz.sig
new file mode 100644
index 0000000..632889d
--- /dev/null
+++ b/SOURCES/libtasn1-4.10.tar.gz.sig
@@ -0,0 +1,10 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQEcBAABCAAGBQJYfRBCAAoJEJ1eqvaQE7hC+CYH/REtFWHHGD250D7cz5s9gdm5
+hGe7xomK40kuKZWOGNm7n0HnNACjZYYTLr1OKZ55BFmikzqPvR5d5e62A2iiP2P7
+AXVW7ypq8M8h+Y0WuleHMtMj1FOyxFBnqUXHC6smiH7BHa3JJcvrd9tqWLuPtMSx
+1/Yc233yRFWjpDmLfjTvMsiGp6y9L3TAD7MihZ//Hs3zbwbmhctRPXkl7gT4tfau
+nZ10yRqrhskuVvX+aC/sMW2N2JX1vuOgY1+hi1lpmwAfRz03oXHq4kUI+7uOFCtn
+BokN8aWKXa9Pvk4juY25Z2HqgpFqV3f77IFt3O9YmzWVaD+a9HEmHMm/hHpkzuU=
+=eRpW
+-----END PGP SIGNATURE-----
diff --git a/SPECS/libtasn1.spec b/SPECS/libtasn1.spec
index a660176..0d26319 100644
--- a/SPECS/libtasn1.spec
+++ b/SPECS/libtasn1.spec
@@ -1,7 +1,7 @@
 Summary:	The ASN.1 library used in GNUTLS
 Name:		libtasn1
-Version:	3.8
-Release:	3%{?dist}
+Version:	4.10
+Release:	1%{?dist}
 
 # The libtasn1 library is LGPLv2+, utilities are GPLv3+
 License:	GPLv3+ and LGPLv2+
@@ -10,8 +10,6 @@ URL:		http://www.gnu.org/software/libtasn1/
 Source0:	http://ftp.gnu.org/gnu/libtasn1/%name-%version.tar.gz
 Source1:	http://ftp.gnu.org/gnu/libtasn1/%name-%version.tar.gz.sig
 Patch1:		libtasn1-2.12-rpath.patch
-Patch2:		libtasn1-3.8-octet-string.patch
-Patch3:		libtasn1-3.8-decoding-long-oid.patch
 BuildRequires:	bison, pkgconfig
 BuildRequires:	autoconf, automake, libtool
 %ifarch %ix86 x86_64 ppc ppc64
@@ -55,8 +53,6 @@ data.
 %setup -q
 
 %patch1 -p1 -b .rpath
-%patch2 -p1 -b .octet-string
-%patch3 -p1 -b .decoding-long-oid
 
 %build
 autoreconf -v -f --install
@@ -108,6 +104,9 @@ test "$1" = 0 -a -f %_infodir/%name.info.gz && \
 
 
 %changelog
+* Wed Jan 18 2017 Nikos Mavrogiannopoulos <nmav@redhat.com> - 4.10-1
+- Updated to the 4.x branch (#1360639)
+
 * Fri Jul  8 2016 Nikos Mavrogiannopoulos <nmav@redhat.com> - 3.8-3
 - Resolve issue which prevented the decoding of long OIDs (#1330753)