mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-27 21:26:36 +00:00
package/ibrcommon: fix dos/unix newlines in patch
Fixes: http://autobuild.buildroot.net/results/e88/e881667f388eea4cce2f804b373af4e3038e7b52/ commit fc9f9cd76f (package/ibrcommon: fix static build with openssl) added a patch to fix static linking. The source code unfortunately contains a mix of DOS and UNIX newlines, and the DOS new lines got stripped by the mailing list, causing the patch to no longer apply. Fix up the patch manually. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
ae7ba64501
commit
82c67d3050
@ -28,67 +28,67 @@ index 8a5745b4..6097b43e 100644
|
|||||||
--- a/ibrcommon/ssl/gcm/gcm.cpp
|
--- a/ibrcommon/ssl/gcm/gcm.cpp
|
||||||
+++ b/ibrcommon/ssl/gcm/gcm.cpp
|
+++ b/ibrcommon/ssl/gcm/gcm.cpp
|
||||||
@@ -89,7 +89,7 @@ ret_type gcm_init_and_key( /* initialise mode and set key
|
@@ -89,7 +89,7 @@ ret_type gcm_init_and_key( /* initialise mode and set key
|
||||||
#elif defined( TABLES_256 )
|
#elif defined( TABLES_256 )
|
||||||
#define gf_mul_hh(a, ctx, scr) gf_mul_256(a, ctx->gf_t256, scr)
|
#define gf_mul_hh(a, ctx, scr) gf_mul_256(a, ctx->gf_t256, scr)
|
||||||
#else
|
#else
|
||||||
-#define gf_mul_hh(a, ctx, scr) gf_mul(a, ui8_ptr(ctx->ghash_h))
|
-#define gf_mul_hh(a, ctx, scr) gf_mul(a, ui8_ptr(ctx->ghash_h))
|
||||||
+#define gf_mul_hh(a, ctx, scr) ibrdtn_gf_mul(a, ui8_ptr(ctx->ghash_h))
|
+#define gf_mul_hh(a, ctx, scr) ibrdtn_gf_mul(a, ui8_ptr(ctx->ghash_h))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ret_type gcm_init_message( /* initialise a new message */
|
ret_type gcm_init_message( /* initialise a new message */
|
||||||
@@ -334,9 +334,9 @@ ret_type gcm_compute_tag( /* compute authentication tag
|
@@ -334,9 +334,9 @@ ret_type gcm_compute_tag( /* compute authentication tag
|
||||||
memcpy(tbuf, ctx->ghash_h, BLOCK_SIZE);
|
memcpy(tbuf, ctx->ghash_h, BLOCK_SIZE);
|
||||||
for( ; ; )
|
for( ; ; )
|
||||||
{
|
{
|
||||||
- if(ln & 1) gf_mul(ui8_ptr(ctx->hdr_ghv), tbuf);
|
- if(ln & 1) gf_mul(ui8_ptr(ctx->hdr_ghv), tbuf);
|
||||||
+ if(ln & 1) ibrdtn_gf_mul(ui8_ptr(ctx->hdr_ghv), tbuf);
|
+ if(ln & 1) ibrdtn_gf_mul(ui8_ptr(ctx->hdr_ghv), tbuf);
|
||||||
if(!(ln >>= 1)) break;
|
if(!(ln >>= 1)) break;
|
||||||
- gf_mul(tbuf, tbuf);
|
- gf_mul(tbuf, tbuf);
|
||||||
+ ibrdtn_gf_mul(tbuf, tbuf);
|
+ ibrdtn_gf_mul(tbuf, tbuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else /* this one seems slower on x86 and x86_64 :-( */
|
#else /* this one seems slower on x86 and x86_64 :-( */
|
||||||
@@ -348,12 +348,12 @@ ret_type gcm_compute_tag( /* compute authentication tag
|
@@ -348,12 +348,12 @@ ret_type gcm_compute_tag( /* compute authentication tag
|
||||||
tbuf[0] = 0x80;
|
tbuf[0] = 0x80;
|
||||||
while(i)
|
while(i)
|
||||||
{
|
{
|
||||||
- gf_mul(tbuf, tbuf);
|
- gf_mul(tbuf, tbuf);
|
||||||
+ ibrdtn_gf_mul(tbuf, tbuf);
|
+ ibrdtn_gf_mul(tbuf, tbuf);
|
||||||
if(i & ln)
|
if(i & ln)
|
||||||
gf_mul_hh(tbuf, ctx, scratch);
|
gf_mul_hh(tbuf, ctx, scratch);
|
||||||
i >>= 1;
|
i >>= 1;
|
||||||
}
|
}
|
||||||
- gf_mul(ui8_ptr(ctx->hdr_ghv), tbuf);
|
- gf_mul(ui8_ptr(ctx->hdr_ghv), tbuf);
|
||||||
+ ibrdtn_gf_mul(ui8_ptr(ctx->hdr_ghv), tbuf);
|
+ ibrdtn_gf_mul(ui8_ptr(ctx->hdr_ghv), tbuf);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
i = BLOCK_SIZE; ln = (uint_32t)(ctx->txt_acnt << 3);
|
i = BLOCK_SIZE; ln = (uint_32t)(ctx->txt_acnt << 3);
|
||||||
diff --git a/ibrcommon/ssl/gcm/gf128mul.cpp b/ibrcommon/ssl/gcm/gf128mul.cpp
|
diff --git a/ibrcommon/ssl/gcm/gf128mul.cpp b/ibrcommon/ssl/gcm/gf128mul.cpp
|
||||||
index a553a044..d0c460c3 100644
|
index a553a044..d0c460c3 100644
|
||||||
--- a/ibrcommon/ssl/gcm/gf128mul.cpp
|
--- a/ibrcommon/ssl/gcm/gf128mul.cpp
|
||||||
+++ b/ibrcommon/ssl/gcm/gf128mul.cpp
|
+++ b/ibrcommon/ssl/gcm/gf128mul.cpp
|
||||||
@@ -103,7 +103,7 @@
|
@@ -103,7 +103,7 @@
|
||||||
|
|
||||||
const unsigned short gf_tab[256] = gf_dat(xda);
|
const unsigned short gf_tab[256] = gf_dat(xda);
|
||||||
|
|
||||||
-void gf_mul(void *a, const void* b)
|
-void gf_mul(void *a, const void* b)
|
||||||
+void ibrdtn_gf_mul(void *a, const void* b)
|
+void ibrdtn_gf_mul(void *a, const void* b)
|
||||||
{ uint_32t r[GF_BYTE_LEN >> 2], p[8][GF_BYTE_LEN >> 2];
|
{ uint_32t r[GF_BYTE_LEN >> 2], p[8][GF_BYTE_LEN >> 2];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
diff --git a/ibrcommon/ssl/gcm/gf128mul.h b/ibrcommon/ssl/gcm/gf128mul.h
|
diff --git a/ibrcommon/ssl/gcm/gf128mul.h b/ibrcommon/ssl/gcm/gf128mul.h
|
||||||
index 4645c7fe..65fba54b 100644
|
index 4645c7fe..65fba54b 100644
|
||||||
--- a/ibrcommon/ssl/gcm/gf128mul.h
|
--- a/ibrcommon/ssl/gcm/gf128mul.h
|
||||||
+++ b/ibrcommon/ssl/gcm/gf128mul.h
|
+++ b/ibrcommon/ssl/gcm/gf128mul.h
|
||||||
@@ -619,7 +619,7 @@ gf_inline void mul_x(void *r, const void *x)
|
@@ -619,7 +619,7 @@ gf_inline void mul_x(void *r, const void *x)
|
||||||
|
|
||||||
/* A slow generic version of gf_mul (a = a * b) */
|
/* A slow generic version of gf_mul (a = a * b) */
|
||||||
|
|
||||||
-void gf_mul(void *a, const void* b);
|
-void gf_mul(void *a, const void* b);
|
||||||
+void ibrdtn_gf_mul(void *a, const void* b);
|
+void ibrdtn_gf_mul(void *a, const void* b);
|
||||||
|
|
||||||
/* This version uses 64k bytes of table space on the stack.
|
/* This version uses 64k bytes of table space on the stack.
|
||||||
A 16 byte buffer has to be multiplied by a 16 byte key
|
A 16 byte buffer has to be multiplied by a 16 byte key
|
||||||
--
|
--
|
||||||
2.14.1
|
2.14.1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user