From: Geoff Thorpe <geoff@openssl.org>
Date: Wed, 31 May 2000 17:35:11 +0000 (+0000)
Subject: sk_value was also suffering from de-const-ification.
X-Git-Tag: OpenSSL-engine-0_9_6-beta1~66^2~18
X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e20d7d71677c6d56f9e486148a0d33cb639765eb;p=oweals%2Fopenssl.git

sk_value was also suffering from de-const-ification.
Also, add in a couple of missing declarations in pkcs7 code.
---

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 *);