[pkg-opensc-commit] [pam-p11] 26/66: random is a glibc function. use a different name.
Eric Dorland
eric at moszumanska.debian.org
Tue Jun 13 04:06:50 UTC 2017
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository pam-p11.
commit 495106568177445597004e00dac50f4936d1bdf8
Author: Andreas Jellinghaus <andreas at ionisiert.de>
Date: Fri Jun 29 14:35:13 2007 +0000
random is a glibc function. use a different name.
---
src/pam_p11.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/pam_p11.c b/src/pam_p11.c
index 7c98fe8..425927b 100644
--- a/src/pam_p11.c
+++ b/src/pam_p11.c
@@ -82,7 +82,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t * pamh, int flags, int argc,
EVP_PKEY *pubkey;
- unsigned char random[RANDOM_SIZE];
+ unsigned char rand_bytes[RANDOM_SIZE];
unsigned char signature[MAX_SIGSIZE];
int fd;
unsigned siglen;
@@ -232,7 +232,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t * pamh, int flags, int argc,
goto out;
}
- rv = read(fd, random, RANDOM_SIZE);
+ rv = read(fd, rand_bytes, RANDOM_SIZE);
if (rv < 0) {
syslog(LOG_ERR, "fatal: read from random source failed: ");
close(fd);
@@ -259,7 +259,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t * pamh, int flags, int argc,
/* ask for a sha1 hash of the random data, signed by the key */
siglen = MAX_SIGSIZE;
- rv = PKCS11_sign(NID_sha1, random, RANDOM_SIZE, signature, &siglen,
+ rv = PKCS11_sign(NID_sha1, rand_bytes, RANDOM_SIZE, signature, &siglen,
authkey);
if (rv != 1) {
syslog(LOG_ERR, "fatal: pkcs11_sign failed\n");
@@ -276,7 +276,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t * pamh, int flags, int argc,
}
/* now verify the result */
- rv = RSA_verify(NID_sha1, random, RANDOM_SIZE,
+ rv = RSA_verify(NID_sha1, rand_bytes, RANDOM_SIZE,
signature, siglen, pubkey->pkey.rsa);
if (rv != 1) {
syslog(LOG_ERR, "fatal: RSA_verify failed\n");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/pam-p11.git
More information about the pkg-opensc-commit
mailing list