Bugzilla – Attachment 32 Details for
Bug 139
OpenSSH portable build fails on linux in 3.1p1 due to missing declarations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for openssl < 0.9.6
CIPHER (text/plain), 3.00 KB, created by
Markus Friedl
on 2002-03-08 06:36:35 AEDT
(
hide
)
Description:
patch for openssl < 0.9.6
Filename:
MIME Type:
Creator:
Markus Friedl
Created:
2002-03-08 06:36:35 AEDT
Size:
3.00 KB
patch
obsolete
>--- cipher.c.orig Mon Feb 18 08:05:32 2002 >+++ cipher.c Thu Mar 7 10:36:28 2002 >@@ -41,6 +41,8 @@ > #include "log.h" > #include "cipher.h" > >+#define EVP_CIPHER_CTX_get_app_data(e) ((e)->app_data) >+ > #include <openssl/md5.h> > #include "rijndael.h" > >@@ -196,20 +198,8 @@ > type = (*cipher->evptype)(); > > EVP_CIPHER_CTX_init(&cc->evp); >- if (EVP_CipherInit(&cc->evp, type, NULL, (u_char *)iv, >- (encrypt == CIPHER_ENCRYPT)) == 0) >- fatal("cipher_init: EVP_CipherInit failed for %s", >- cipher->name); >- klen = EVP_CIPHER_CTX_key_length(&cc->evp); >- if (klen > 0 && keylen != klen) { >- debug("cipher_init: set keylen (%d -> %d)", klen, keylen); >- if (EVP_CIPHER_CTX_set_key_length(&cc->evp, keylen) == 0) >- fatal("cipher_init: set keylen failed (%d -> %d)", >- klen, keylen); >- } >- if (EVP_CipherInit(&cc->evp, NULL, (u_char *)key, NULL, -1) == 0) >- fatal("cipher_init: EVP_CipherInit: set key failed for %s", >- cipher->name); >+ EVP_CipherInit(&cc->evp, type, (u_char *)key, (u_char *)iv, >+ (encrypt == CIPHER_ENCRYPT)); > } > > void >@@ -217,15 +207,13 @@ > { > if (len % cc->cipher->block_size) > fatal("cipher_encrypt: bad plaintext length %d", len); >- if (EVP_Cipher(&cc->evp, dest, (u_char *)src, len) == 0) >- fatal("evp_crypt: EVP_Cipher failed"); >+ EVP_Cipher(&cc->evp, dest, (u_char *)src, len); > } > > void > cipher_cleanup(CipherContext *cc) > { >- if (EVP_CIPHER_CTX_cleanup(&cc->evp) == 0) >- error("cipher_cleanup: EVP_CIPHER_CTX_cleanup failed"); >+ EVP_CIPHER_CTX_cleanup(&cc->evp); > } > > /* >@@ -296,14 +284,9 @@ > EVP_CIPHER_CTX_init(&c->k1); > EVP_CIPHER_CTX_init(&c->k2); > EVP_CIPHER_CTX_init(&c->k3); >- if (EVP_CipherInit(&c->k1, EVP_des_cbc(), k1, NULL, enc) == 0 || >- EVP_CipherInit(&c->k2, EVP_des_cbc(), k2, NULL, !enc) == 0 || >- EVP_CipherInit(&c->k3, EVP_des_cbc(), k3, NULL, enc) == 0) { >- memset(c, 0, sizeof(*c)); >- xfree(c); >- EVP_CIPHER_CTX_set_app_data(ctx, NULL); >- return (0); >- } >+ EVP_CipherInit(&c->k1, EVP_des_cbc(), k1, NULL, enc); >+ EVP_CipherInit(&c->k2, EVP_des_cbc(), k2, NULL, !enc); >+ EVP_CipherInit(&c->k3, EVP_des_cbc(), k3, NULL, enc); > return (1); > } > static int >@@ -315,10 +298,9 @@ > error("ssh1_3des_cbc: no context"); > return (0); > } >- if (EVP_Cipher(&c->k1, dest, (u_char *)src, len) == 0 || >- EVP_Cipher(&c->k2, dest, dest, len) == 0 || >- EVP_Cipher(&c->k3, dest, dest, len) == 0) >- return (0); >+ EVP_Cipher(&c->k1, dest, (u_char *)src, len); >+ EVP_Cipher(&c->k2, dest, dest, len); >+ EVP_Cipher(&c->k3, dest, dest, len); > return (1); > } > static int >@@ -346,7 +328,6 @@ > ssh1_3des.init = ssh1_3des_init; > ssh1_3des.cleanup = ssh1_3des_cleanup; > ssh1_3des.do_cipher = ssh1_3des_cbc; >- ssh1_3des.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH; > return (&ssh1_3des); > } > >@@ -494,7 +475,5 @@ > rijndal_cbc.init = ssh_rijndael_init; > rijndal_cbc.cleanup = ssh_rijndael_cleanup; > rijndal_cbc.do_cipher = ssh_rijndael_cbc; >- rijndal_cbc.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH | >- EVP_CIPH_ALWAYS_CALL_INIT; > return (&rijndal_cbc); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 139
: 32