| OLD | NEW |
| 1 /* crypto/des/enc_writ.c */ | 1 /* crypto/des/enc_writ.c */ |
| 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * This package is an SSL implementation written | 5 * This package is an SSL implementation written |
| 6 * by Eric Young (eay@cryptsoft.com). | 6 * by Eric Young (eay@cryptsoft.com). |
| 7 * The implementation was written so as to conform with Netscapes SSL. | 7 * The implementation was written so as to conform with Netscapes SSL. |
| 8 * | 8 * |
| 9 * This library is free for commercial and non-commercial use as long as | 9 * This library is free for commercial and non-commercial use as long as |
| 10 * the following conditions are aheared to. The following conditions | 10 * the following conditions are aheared to. The following conditions |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 * using the same IV. So don't use these functions unless you | 73 * using the same IV. So don't use these functions unless you |
| 74 * are sure you know what you do (in which case you might | 74 * are sure you know what you do (in which case you might |
| 75 * not want to use them anyway). | 75 * not want to use them anyway). |
| 76 * | 76 * |
| 77 * - This code cannot handle non-blocking sockets. | 77 * - This code cannot handle non-blocking sockets. |
| 78 */ | 78 */ |
| 79 | 79 |
| 80 int DES_enc_write(int fd, const void *_buf, int len, | 80 int DES_enc_write(int fd, const void *_buf, int len, |
| 81 DES_key_schedule *sched, DES_cblock *iv) | 81 DES_key_schedule *sched, DES_cblock *iv) |
| 82 { | 82 { |
| 83 #if defined(OPENSSL_NO_POSIX_IO) |
| 84 return (-1); |
| 85 #else |
| 83 #ifdef _LIBC | 86 #ifdef _LIBC |
| 84 extern unsigned long time(); | 87 extern unsigned long time(); |
| 85 extern int write(); | 88 extern int write(); |
| 86 #endif | 89 #endif |
| 87 const unsigned char *buf=_buf; | 90 const unsigned char *buf=_buf; |
| 88 long rnum; | 91 long rnum; |
| 89 int i,j,k,outnum; | 92 int i,j,k,outnum; |
| 90 static unsigned char *outbuf=NULL; | 93 static unsigned char *outbuf=NULL; |
| 91 unsigned char shortbuf[8]; | 94 unsigned char shortbuf[8]; |
| 92 unsigned char *p; | 95 unsigned char *p; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 i=0; | 168 i=0; |
| 166 else | 169 else |
| 167 #endif | 170 #endif |
| 168 /* This is really a bad error - very bad | 171 /* This is really a bad error - very bad |
| 169 * It will stuff-up both ends. */ | 172 * It will stuff-up both ends. */ |
| 170 return(-1); | 173 return(-1); |
| 171 } | 174 } |
| 172 } | 175 } |
| 173 | 176 |
| 174 return(len); | 177 return(len); |
| 178 #endif /* OPENSSL_NO_POSIX_IO */ |
| 175 } | 179 } |
| OLD | NEW |