Douglas E. Engert: fix more compiler warnings.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3190 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
aj 2007-06-24 21:03:30 +00:00
parent 4ca4eba365
commit 1069b4e018
1 changed files with 8 additions and 6 deletions

View File

@ -1112,10 +1112,11 @@ static void parse_certificate(struct x509cert_info *cert,
{
X509 *x;
unsigned char *p;
const unsigned char *pp;
int n;
p = data;
x = d2i_X509(NULL, &p, len);
pp = data;
x = d2i_X509(NULL, &pp, len);
if (!x) {
/* ERR_print_errors_fp(stderr); */
fatal("OpenSSL error during X509 certificate parsing");
@ -2171,7 +2172,8 @@ static EVP_PKEY *get_public_key(CK_SESSION_HANDLE session, CK_OBJECT_HANDLE priv
unsigned char *id;
CK_ULONG idLen;
CK_OBJECT_HANDLE pubkeyObject;
unsigned char *pubkey, *pubkey_sav;
unsigned char *pubkey;
const unsigned char *pubkey_c;
CK_ULONG pubkeyLen;
EVP_PKEY *pkey;
@ -2195,9 +2197,9 @@ static EVP_PKEY *get_public_key(CK_SESSION_HANDLE session, CK_OBJECT_HANDLE priv
return NULL;
}
pubkey_sav = pubkey; /* The function below may change pubkey */
pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &pubkey, pubkeyLen);
free(pubkey_sav);
pubkey_c = pubkey;
pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &pubkey_c, pubkeyLen);
free(pubkey);
if (pkey == NULL) {
printf(" couldn't parse pubkey, no verification done\n");