Commit a4aba800 authored by Richard Levitte's avatar Richard Levitte
Browse files

Constify DSA-related code.

parent 669cefdd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@
#define d2i_ASN1_INTEGER d2i_ASN1_UINTEGER
#endif

DSA *d2i_DSAparams(DSA **a, unsigned char **pp, long length)
DSA *d2i_DSAparams(DSA **a, const unsigned char **pp, long length)
	{
	int i=ERR_R_NESTED_ASN1_ERROR;
	ASN1_INTEGER *bs=NULL;
+2 −1
Original line number Diff line number Diff line
@@ -94,7 +94,8 @@ EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, unsigned char **pp,
#endif
#ifndef NO_DSA
	case EVP_PKEY_DSA:
		if ((ret->pkey.dsa=d2i_DSAPrivateKey(NULL,pp,length)) == NULL)
		if ((ret->pkey.dsa=d2i_DSAPrivateKey(NULL,
			(const unsigned char **)pp,length)) == NULL) /* TMP UGLY CAST */
			{
			ASN1err(ASN1_F_D2I_PRIVATEKEY,ERR_R_ASN1_LIB);
			goto err;
+2 −1
Original line number Diff line number Diff line
@@ -94,7 +94,8 @@ EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, unsigned char **pp,
#endif
#ifndef NO_DSA
	case EVP_PKEY_DSA:
		if ((ret->pkey.dsa=d2i_DSAPublicKey(NULL,pp,length)) == NULL)
		if ((ret->pkey.dsa=d2i_DSAPublicKey(NULL,
			(const unsigned char **)pp,length)) == NULL) /* TMP UGLY CAST */
			{
			ASN1err(ASN1_F_D2I_PUBLICKEY,ERR_R_ASN1_LIB);
			goto err;
+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@
#include <openssl/objects.h>
#include <openssl/asn1_mac.h>

DSA *d2i_DSAPrivateKey(DSA **a, unsigned char **pp, long length)
DSA *d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length)
	{
	int i=ASN1_R_PARSING;
	ASN1_INTEGER *bs=NULL;
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@
#define d2i_ASN1_INTEGER d2i_ASN1_UINTEGER
#endif

DSA *d2i_DSAPublicKey(DSA **a, unsigned char **pp, long length)
DSA *d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length)
	{
	int i=ASN1_R_PARSING;
	ASN1_INTEGER *bs=NULL;
Loading