[patch 1/9] Silence compiler warnings in openssl.c

Поиск
Список
Период
Сортировка
От Marko Kreen
Тема [patch 1/9] Silence compiler warnings in openssl.c
Дата
Msg-id 20060711195802.031575000@localhost.localdomain
обсуждение исходный текст
Ответ на [patch 0/9] annual pgcrypto update  (Marko Kreen <markokr@gmail.com>)
Список pgsql-patches
Function DES_ecb3_encrypt has unstable signature in OpenSSL.

Different versions of OpenSSL have different argument types
and it is not possible to pick right types by OpenSSL version.

Following patch silents compiler by forcing argument to (void *).

Index: pgsql/contrib/pgcrypto/openssl.c
===================================================================
*** pgsql.orig/contrib/pgcrypto/openssl.c
--- pgsql/contrib/pgcrypto/openssl.c
*************** ossl_des3_ecb_encrypt(PX_Cipher * c, con
*** 526,532 ****
      ossldata   *od = c->ptr;

      for (i = 0; i < dlen / bs; i++)
!         DES_ecb3_encrypt(data + i * bs, res + i * bs,
                           &od->u.des3.k1, &od->u.des3.k2, &od->u.des3.k3, 1);
      return 0;
  }
--- 526,532 ----
      ossldata   *od = c->ptr;

      for (i = 0; i < dlen / bs; i++)
!         DES_ecb3_encrypt((void *)(data + i * bs), (void *)(res + i * bs),
                           &od->u.des3.k1, &od->u.des3.k2, &od->u.des3.k3, 1);
      return 0;
  }
*************** ossl_des3_ecb_decrypt(PX_Cipher * c, con
*** 540,546 ****
      ossldata   *od = c->ptr;

      for (i = 0; i < dlen / bs; i++)
!         DES_ecb3_encrypt(data + i * bs, res + i * bs,
                           &od->u.des3.k1, &od->u.des3.k2, &od->u.des3.k3, 0);
      return 0;
  }
--- 540,546 ----
      ossldata   *od = c->ptr;

      for (i = 0; i < dlen / bs; i++)
!         DES_ecb3_encrypt((void *)(data + i * bs), (void *)(res + i * bs),
                           &od->u.des3.k1, &od->u.des3.k2, &od->u.des3.k3, 0);
      return 0;
  }

--

В списке pgsql-patches по дате отправления:

Предыдущее
От: Marko Kreen
Дата:
Сообщение: [patch 4/9] Fix use of CAST5 in regtests.
Следующее
От: Dhanaraj M
Дата:
Сообщение: Re: Patch for - Change LIMIT/OFFSET to use int8