From e20d7d71677c6d56f9e486148a0d33cb639765eb Mon Sep 17 00:00:00 2001 From: Geoff Thorpe Date: Wed, 31 May 2000 17:35:11 +0000 Subject: [PATCH] sk_value was also suffering from de-const-ification. Also, add in a couple of missing declarations in pkcs7 code. --- crypto/pkcs7/pk7_mime.c | 2 ++ crypto/stack/stack.c | 2 +- crypto/stack/stack.h | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crypto/pkcs7/pk7_mime.c b/crypto/pkcs7/pk7_mime.c index 3049e0adb1..5abd0ec8fa 100644 --- a/crypto/pkcs7/pk7_mime.c +++ b/crypto/pkcs7/pk7_mime.c @@ -74,6 +74,7 @@ char *param_name; /* Param name e.g. "micalg" */ char *param_value; /* Param value e.g. "sha1" */ } MIME_PARAM; +DECLARE_STACK_OF(MIME_PARAM) IMPLEMENT_STACK_OF(MIME_PARAM) typedef struct { @@ -82,6 +83,7 @@ char *value; /* Value of line e.g. "text/plain" */ STACK_OF(MIME_PARAM) *params; /* Zero or more parameters */ } MIME_HEADER; +DECLARE_STACK_OF(MIME_HEADER) IMPLEMENT_STACK_OF(MIME_HEADER) static int B64_write_PKCS7(BIO *bio, PKCS7 *p7); diff --git a/crypto/stack/stack.c b/crypto/stack/stack.c index 8ab4302c2e..be132d5dea 100644 --- a/crypto/stack/stack.c +++ b/crypto/stack/stack.c @@ -285,7 +285,7 @@ int sk_num(const STACK *st) return st->num; } -char *sk_value(STACK *st, int i) +char *sk_value(const STACK *st, int i) { if(st == NULL) return NULL; return st->data[i]; diff --git a/crypto/stack/stack.h b/crypto/stack/stack.h index 0cc3b44cc0..1613ac5fb1 100644 --- a/crypto/stack/stack.h +++ b/crypto/stack/stack.h @@ -80,7 +80,7 @@ typedef struct stack_st #define M_sk_value(sk,n) ((sk) ? (sk)->data[n] : NULL) int sk_num(const STACK *); -char *sk_value(STACK *, int); +char *sk_value(const STACK *, int); char *sk_set(STACK *, int, char *); -- 2.25.1