diff options
author | relyea%netscape.com <devnull@localhost> | 2001-03-31 01:08:32 +0000 |
---|---|---|
committer | relyea%netscape.com <devnull@localhost> | 2001-03-31 01:08:32 +0000 |
commit | 87710d4d34bc12953cfd3fdecd781db1b6744018 (patch) | |
tree | 6b385079ffa664ace3cd434bff11ff7bf11fe4bd | |
parent | 7b9b5deedffff5074475d33b4c7d6d5ed0294792 (diff) | |
download | nss-hg-87710d4d34bc12953cfd3fdecd781db1b6744018.tar.gz |
Back out the changes to try to get WIN 2000 to work. The problem looks like an interaction between NSPR/Async IO/and Samba. We'll resolve it at that level.
-rw-r--r-- | security/nss/cmd/pk12util/pk12util.c | 43 | ||||
-rw-r--r-- | security/nss/cmd/pk12util/pk12util.h | 4 |
2 files changed, 0 insertions, 47 deletions
diff --git a/security/nss/cmd/pk12util/pk12util.c b/security/nss/cmd/pk12util/pk12util.c index faa913706..4d9ca833c 100644 --- a/security/nss/cmd/pk12util/pk12util.c +++ b/security/nss/cmd/pk12util/pk12util.c @@ -89,13 +89,6 @@ p12u_DestroyExportFileInfo(p12uContext **exp_ptr, PRBool removeFile) if(!exp_ptr || !(*exp_ptr)) { return; } -#if defined(_WIN32) - if ((*exp_ptr)->hasBufferData) { - (*exp_ptr)->hasBufferData = PR_FALSE; - PR_Write((*exp_ptr)->file, (*exp_ptr)->bufferData, (int32)1); - /* what about failure? */ - } -#endif if((*exp_ptr)->file != NULL) { PR_Close((*exp_ptr)->file); @@ -136,9 +129,6 @@ p12u_InitFile(PRBool fileImport, char *filename) p12cxt->error = PR_FALSE; p12cxt->errorValue = 0; p12cxt->filename = strdup(filename); -#if defined(_WIN32) - p12cxt->hasBufferData = PR_FALSE; -#endif if(!p12u_OpenExportFile(p12cxt, fileImport)) { PR_SetError(p12cxt->errorValue, 0); @@ -191,9 +181,6 @@ p12u_CreateTemporaryDigestFile(void) #else p12cxt->filename = strdup("/tmp/"TEMPFILE); #endif -#if defined(_WIN32) - p12cxt->hasBufferData = PR_FALSE; -#endif if (!p12cxt->filename) { PR_SetError(SEC_ERROR_NO_MEMORY, 0); @@ -688,16 +675,6 @@ p12u_WriteToExportFile(void *arg, const char *buf, unsigned long len) if(!p12cxt || (p12cxt->error == PR_TRUE)) { return; } -#if defined(_WIN32) - /* Windows 2000 treats single byte writes as double byte characters! - * hack to deal with this until we figure out how to tell it not to in - * nspr */ - if ((len == 1) && (p12cxt->hasBufferData == PR_FALSE)) { - p12cxt->bufferData[0] = (unsigned char) *buf; - p12cxt->hasBufferData = PR_TRUE; - return; - } -#endif if(p12cxt->file == NULL) { p12cxt->errorValue = SEC_ERROR_PKCS12_UNABLE_TO_WRITE; @@ -705,23 +682,6 @@ p12u_WriteToExportFile(void *arg, const char *buf, unsigned long len) return; } -#if defined(_WIN32) - if (p12cxt->hasBufferData) { - p12cxt->hasBufferData = PR_FALSE; - p12cxt->bufferData[1] = (unsigned char) *buf++; - len--; - writeLen = PR_Write(p12cxt->file, p12cxt->bufferData, (int32)2); - if (writeLen != 2) { - PR_Close(p12cxt->file); - PR_Free(p12cxt->filename); - p12cxt->filename = NULL; - p12cxt->file = NULL; - p12cxt->errorValue = SEC_ERROR_PKCS12_UNABLE_TO_WRITE; - p12cxt->error = PR_TRUE; - } - } - if (len != 0) { -#endif writeLen = PR_Write(p12cxt->file, (unsigned char *)buf, (int32)len); if(writeLen != (int)len) { @@ -732,9 +692,6 @@ p12u_WriteToExportFile(void *arg, const char *buf, unsigned long len) p12cxt->errorValue = SEC_ERROR_PKCS12_UNABLE_TO_WRITE; p12cxt->error = PR_TRUE; } -#if defined(_WIN32) - } -#endif } void diff --git a/security/nss/cmd/pk12util/pk12util.h b/security/nss/cmd/pk12util/pk12util.h index b1d1a0f63..112f61c01 100644 --- a/security/nss/cmd/pk12util/pk12util.h +++ b/security/nss/cmd/pk12util/pk12util.h @@ -67,8 +67,4 @@ typedef struct p12uContextStr { PRBool error; /* error occurred? */ int errorValue; /* which error occurred? */ SECItem *data; -#ifdef _WIN32 - PRBool hasBufferData; - unsigned char bufferData[2]; -#endif } p12uContext; |