|
|
0ac9f2 |
From 33bcca8303cad962606df3bfc6a031a9b0626375 Mon Sep 17 00:00:00 2001
|
|
|
0ac9f2 |
From: Peter Jones <pjones@redhat.com>
|
|
|
0ac9f2 |
Date: Thu, 21 Apr 2016 10:47:34 -0400
|
|
|
0ac9f2 |
Subject: [PATCH 01/29] cms: kill generate_integer(), it doesn't build on i686
|
|
|
0ac9f2 |
and it's unused.
|
|
|
0ac9f2 |
|
|
|
0ac9f2 |
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
|
0ac9f2 |
---
|
|
|
0ac9f2 |
src/cms_common.c | 34 ----------------------------------
|
|
|
0ac9f2 |
src/cms_common.h | 1 -
|
|
|
0ac9f2 |
2 files changed, 35 deletions(-)
|
|
|
0ac9f2 |
|
|
|
0ac9f2 |
diff --git a/src/cms_common.c b/src/cms_common.c
|
|
|
0ac9f2 |
index b19bc62..6a4e6a7 100644
|
|
|
0ac9f2 |
--- a/src/cms_common.c
|
|
|
0ac9f2 |
+++ b/src/cms_common.c
|
|
|
0ac9f2 |
@@ -641,40 +641,6 @@ generate_string(cms_context *cms, SECItem *der, char *str)
|
|
|
0ac9f2 |
return 0;
|
|
|
0ac9f2 |
}
|
|
|
0ac9f2 |
|
|
|
0ac9f2 |
-static SEC_ASN1Template IntegerTemplate[] = {
|
|
|
0ac9f2 |
- {.kind = SEC_ASN1_INTEGER,
|
|
|
0ac9f2 |
- .offset = 0,
|
|
|
0ac9f2 |
- .sub = NULL,
|
|
|
0ac9f2 |
- .size = sizeof(long),
|
|
|
0ac9f2 |
- },
|
|
|
0ac9f2 |
- { 0 },
|
|
|
0ac9f2 |
-};
|
|
|
0ac9f2 |
-
|
|
|
0ac9f2 |
-int
|
|
|
0ac9f2 |
-generate_integer(cms_context *cms, SECItem *der, unsigned long integer)
|
|
|
0ac9f2 |
-{
|
|
|
0ac9f2 |
- void *ret;
|
|
|
0ac9f2 |
-
|
|
|
0ac9f2 |
- uint32_t u32;
|
|
|
0ac9f2 |
-
|
|
|
0ac9f2 |
- SECItem input = {
|
|
|
0ac9f2 |
- .data = (void *)&integer,
|
|
|
0ac9f2 |
- .len = sizeof(integer),
|
|
|
0ac9f2 |
- .type = siUnsignedInteger,
|
|
|
0ac9f2 |
- };
|
|
|
0ac9f2 |
-
|
|
|
0ac9f2 |
- if (integer < 0x100000000) {
|
|
|
0ac9f2 |
- u32 = integer & 0xffffffffUL;
|
|
|
0ac9f2 |
- input.data = (void *)&u3;;
|
|
|
0ac9f2 |
- input.len = sizeof(u32);
|
|
|
0ac9f2 |
- }
|
|
|
0ac9f2 |
-
|
|
|
0ac9f2 |
- ret = SEC_ASN1EncodeItem(cms->arena, der, &input, IntegerTemplate);
|
|
|
0ac9f2 |
- if (ret == NULL)
|
|
|
0ac9f2 |
- cmsreterr(-1, cms, "could not encode data");
|
|
|
0ac9f2 |
- return 0;
|
|
|
0ac9f2 |
-}
|
|
|
0ac9f2 |
-
|
|
|
0ac9f2 |
int
|
|
|
0ac9f2 |
generate_time(cms_context *cms, SECItem *encoded, time_t when)
|
|
|
0ac9f2 |
{
|
|
|
0ac9f2 |
diff --git a/src/cms_common.h b/src/cms_common.h
|
|
|
0ac9f2 |
index 7d77faf..c7d7268 100644
|
|
|
0ac9f2 |
--- a/src/cms_common.h
|
|
|
0ac9f2 |
+++ b/src/cms_common.h
|
|
|
0ac9f2 |
@@ -117,7 +117,6 @@ extern int generate_object_id(cms_context *ctx, SECItem *encoded,
|
|
|
0ac9f2 |
SECOidTag tag);
|
|
|
0ac9f2 |
extern int generate_empty_sequence(cms_context *ctx, SECItem *encoded);
|
|
|
0ac9f2 |
extern int generate_time(cms_context *ctx, SECItem *encoded, time_t when);
|
|
|
0ac9f2 |
-extern int generate_integer(cms_context *cms, SECItem *der, unsigned long integer);
|
|
|
0ac9f2 |
extern int generate_string(cms_context *cms, SECItem *der, char *str);
|
|
|
0ac9f2 |
extern int wrap_in_set(cms_context *cms, SECItem *der, SECItem **items);
|
|
|
0ac9f2 |
extern int wrap_in_seq(cms_context *cms, SECItem *der,
|
|
|
0ac9f2 |
--
|
|
|
0ac9f2 |
2.13.4
|
|
|
0ac9f2 |
|