Kaynağa Gözat

Handle long OID nodes.

This will behave differently on 32bit architectures, but since 32bit
is mostly dead and I don't see a way how to handle this w/o breaking
ABI&API, I guess we have to live with it.

Signed-off-by: Steffen Jaeckel <[email protected]>
Steffen Jaeckel 1 ay önce
ebeveyn
işleme
18b4e3f2ef

+ 1 - 1
src/pk/asn1/der/object_identifier/der_encode_object_identifier.c

@@ -59,7 +59,7 @@ int der_encode_object_identifier(const unsigned long *words, unsigned long  nwor
    wordbuf = words[0] * 40 + words[1];
    for (i = 1; i < nwords; i++) {
       /* store 7 bit words in little endian */
-      t    = wordbuf & 0xFFFFFFFF;
+      t    = wordbuf;
       if (t) {
          y    = x;
          mask = 0;

+ 0 - 1
src/pk/asn1/der/object_identifier/der_length_object_identifier.c

@@ -12,7 +12,6 @@
 unsigned long der_object_identifier_bits(unsigned long x)
 {
    unsigned long c;
-   x &= 0xFFFFFFFF;
    c  = 0;
    while (x) {
      ++c;