diff options
author | rcritten <> | 2006-01-04 22:07:58 +0000 |
---|---|---|
committer | rcritten <> | 2006-01-04 22:07:58 +0000 |
commit | 6286793e32535b2db1bc82398257a953ee36936f (patch) | |
tree | 8b36bd4acda9f174fbbade65fc582dbbcf249d56 /nss_engine_pphrase.c | |
parent | d4cb1bb2095b03b502e2fd70f3c05d87ea01f9a2 (diff) | |
download | mod_nss-6286793e32535b2db1bc82398257a953ee36936f.tar.gz mod_nss-6286793e32535b2db1bc82398257a953ee36936f.tar.xz mod_nss-6286793e32535b2db1bc82398257a953ee36936f.zip |
Changes to allow the mod_nss to work in Apache 2.2.0. Based on a patch
from Oden Eriksson.
The conditional to determine which API to use is a bit weak at the moment
but it works with Apache 2.0.54 and 2.2.0.
Diffstat (limited to 'nss_engine_pphrase.c')
-rw-r--r-- | nss_engine_pphrase.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nss_engine_pphrase.c b/nss_engine_pphrase.c index 7524511..7dbc2a9 100644 --- a/nss_engine_pphrase.c +++ b/nss_engine_pphrase.c @@ -125,7 +125,7 @@ static char * nss_password_prompt(PK11SlotInfo *slot, PRBool retry, void *arg) snprintf(buf, 1024, "STOR\t%s\t%s", PK11_GetTokenName(slot), passwd); rv = apr_file_write_full(parg->mc->proc.in, buf, strlen(buf), NULL); - if (!APR_STATUS_IS_SUCCESS(rv)) { + if (rv != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "Unable to write to pin store for slot: %s APR err: %d", PK11_GetTokenName(slot), rv); nss_die(); @@ -139,9 +139,9 @@ static char * nss_password_prompt(PK11SlotInfo *slot, PRBool retry, void *arg) memset(buf, 0, sizeof(buf)); rv = apr_file_read(parg->mc->proc.out, buf, &nBytes); - if (APR_STATUS_IS_SUCCESS(rv)) + if (rv = APR_SUCCESS) res = atoi(buf); - if (!APR_STATUS_IS_SUCCESS(rv) || + if (rv != APR_SUCCESS || (res != PIN_SUCCESS && res != PIN_INCORRECTPW)) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "Unable to read from pin store for slot: %s APR err: %d", PK11_GetTokenName(slot), rv); @@ -245,7 +245,7 @@ static unsigned char *nss_get_password(FILE *input, FILE *output, snprintf(buf, 1024, "RETR\t%s", token_name); rv = apr_file_write_full(parg->mc->proc.in, buf, strlen(buf), NULL); - if (!APR_STATUS_IS_SUCCESS(rv)) { + if (rv != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "Unable to write to pin store for slot: %s APR err: %d", PK11_GetTokenName(slot), rv); nss_die(); @@ -256,7 +256,7 @@ static unsigned char *nss_get_password(FILE *input, FILE *output, */ memset(buf, 0, sizeof(buf)); rv = apr_file_read(parg->mc->proc.out, buf, &nBytes); - if (!APR_STATUS_IS_SUCCESS(rv)) { + if (rv != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "Unable to read from pin store for slot: %s APR err: %d", PK11_GetTokenName(slot), rv); nss_die(); |