• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision9676 (tree)
Time2022-01-05 00:39:49
Authornmaya

Log Message

r9623 で削除した OpenSSL 1.1 以降用のコードを戻し、#ifdef で使い分ける

r9658 の不足分

merge from libressl_3_4_2_cmake:
r9673

Change Summary

Incremental Difference

--- branches/libressl_3_4_2/ttssh2/ttxssh/cipher-3des1.c (revision 9675)
+++ branches/libressl_3_4_2/ttssh2/ttxssh/cipher-3des1.c (revision 9676)
@@ -125,6 +125,22 @@
125125
126126 const EVP_CIPHER *evp_ssh1_3des(void)
127127 {
128+#ifndef LIBRESSL_VERSION_NUMBER
129+ static EVP_CIPHER *p = NULL;
130+
131+ if (p == NULL) {
132+ p = EVP_CIPHER_meth_new(NID_undef, /*block_size*/8, /*key_len*/16);
133+ /*** TODO: OPENSSL1.1.1 ERROR CHECK(ticket#39335で処置予定) ***/
134+ }
135+ if (p) {
136+ EVP_CIPHER_meth_set_iv_length(p, 0);
137+ EVP_CIPHER_meth_set_init(p, ssh1_3des_init);
138+ EVP_CIPHER_meth_set_cleanup(p, ssh1_3des_cleanup);
139+ EVP_CIPHER_meth_set_do_cipher(p, ssh1_3des_cbc);
140+ EVP_CIPHER_meth_set_flags(p, EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH);
141+ }
142+ return (p);
143+#else
128144 static EVP_CIPHER ssh1_3des;
129145
130146 memset(&ssh1_3des, 0, sizeof(EVP_CIPHER));
@@ -137,4 +153,5 @@
137153 ssh1_3des.do_cipher = ssh1_3des_cbc;
138154 ssh1_3des.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH;
139155 return (&ssh1_3des);
156+#endif
140157 }
Show on old repository browser