Skip to content
Snippets Groups Projects
  1. Dec 27, 2011
  2. Sep 20, 2010
  3. Jun 11, 2009
  4. Nov 15, 2007
  5. Sep 29, 2007
  6. Oct 04, 2006
  7. Sep 06, 2006
  8. Jul 13, 2006
    • Neil Conway's avatar
      "Annual" pgcrypto update from Marko Kreen: · 1abf76e8
      Neil Conway authored
      Few cleanups and couple of new things:
      
       - add SHA2 algorithm to older OpenSSL
       - add BIGNUM math to have public-key cryptography work on non-OpenSSL
         build.
       - gen_random_bytes() function
      
      The status of SHA2 algoritms and public-key encryption can now be
      changed to 'always available.'
      
      That makes pgcrypto functionally complete and unless there will be new
      editions of AES, SHA2 or OpenPGP standards, there is no major changes
      planned.
      1abf76e8
  9. Feb 18, 2006
    • Neil Conway's avatar
      Patch from Marko Kreen: · ce9b75db
      Neil Conway authored
      pgcrypto crypt()/md5 and hmac() leak memory when compiled against
      OpenSSL as openssl.c digest ->reset will do two DigestInit calls
      against a context.  This happened to work with OpenSSL 0.9.6
      but not with 0.9.7+.
      
      Reason for the messy code was that I tried to avoid creating
      wrapper structure to transport algorithm info and tried to use
      OpenSSL context for it.  The fix is to create wrapper structure.
      
      It also uses newer digest API to avoid memory allocations
      on reset with newer OpenSSLs.
      
      Thanks to Daniel Blaisdell for reporting it.
      ce9b75db
  10. Oct 15, 2005
  11. Jul 12, 2005
  12. Jul 11, 2005
  13. Jul 10, 2005
    • Bruce Momjian's avatar
      As Kris Jurka found out, pgcrypto does not work with · d51df918
      Bruce Momjian authored
      OpenSSL 0.9.6x.  The DES functions use the older 'des_'
      API, but the newer 3DES functions use the 0.9.7x-only
      'DES_' API.
      
      I think I just used /usr/include/openssl/des.h for reference
      when implementing them, and had upgraded OpenSSL in the
      meantime.
      
      Following patch converts DES also to newer API and provides
      compatibility functions for OpenSSL < 0.9.7.
      
      I chose this route because:
      
      - openssl.c uses few DES functions.
      - compatibility for old 'des_' API is going away at some point
        of time from OpenSSL.
      - as seen from macros, new API is saner
      - Thus pgcrypto supports any OpenSSL version from 0.9.5 to 1.0
      
      Tested with OpenSSL 0.9.6c and 0.9.7e.
      
      Marko Kreen
      d51df918
    • Bruce Momjian's avatar
      - Add Fortuna PRNG to pgcrypto. · 4fcf8b11
      Bruce Momjian authored
      - Move openssl random provider to openssl.c and builtin provider
        to internal.c
      - Make px_random_bytes use Fortuna, instead of giving error.
      - Retarget random.c to aquiring system randomness, for initial seeding
        of Fortuna.  There is ATM 2 functions for Windows,
        reader from /dev/urandom and the regular time()/getpid() silliness.
      
      Marko Kreen
      4fcf8b11
  14. Jul 05, 2005
  15. Jul 04, 2005
  16. Jul 03, 2005
    • Bruce Momjian's avatar
      This patch allows contrib/pgcrypto to build with OpenSSL 0.9.8 · 76eca0ec
      Bruce Momjian authored
      (currently in beta) when cryptolib = openssl.  According to the
      following checkin message from several years ago, OpenSSL application
      developers should no longer rely on <openssl/evp.h> to include
      everything they need:
      
      http://cvs.openssl.org/chngview?cn=9888
      
      This patch adds the necessary header files.  It doesn't appear to
      break anything when building against OpenSSL 0.9.7.
      
      BTW, core appears to build and work fine with OpenSSL 0.9.8.  I've
      built 7.3 through HEAD against 0.9.8-beta6 without noticing any
      problems.
      
      Michael Fuhr
      76eca0ec
  17. Mar 21, 2005
    • Neil Conway's avatar
      pgcrypto update: · 1ea9169b
      Neil Conway authored
      * openssl.c: Add 3des and AES support
      * README.pgcrypto: list only supported ciphers for openssl
      
      OpenSSL has pre-processor symbol OPENSSL_NO_AES, which
      isn't that helpful for detecting if it _does_ exist.
      Thus the hack with AES_ENCRYPT.
      
      Marko Kreen
      1ea9169b
    • Neil Conway's avatar
      pgcrypto update: · b160d6b9
      Neil Conway authored
      * Use error codes instead of -1
      * px_strerror for new error codes
      * calling convention change for px_gen_salt - return error code
      * use px_strerror in pgcrypto.c
      
      Marko Kreen
      b160d6b9
    • Neil Conway's avatar
      * construct "struct {} list [] = {}" confuses pgindent - split those. · fa332a06
      Neil Conway authored
        It was a bad style to begin with, and now several loops can be clearer.
      * pgcrypto.c: Fix function comments
      * crypt-gensalt.c, crypt-blowfish.c: stop messing with errno
      * openssl.c: use px_free instead pfree
      * px.h: make redefining px_alloc/px_realloc/px_free easier
      
      Marko Kreen
      fa332a06
  18. Mar 12, 2005
    • Neil Conway's avatar
      Some builds (depends on crypto engine support?) of OpenSSL · 919594f3
      Neil Conway authored
      0.9.7x have EVP_DigestFinal function which which clears all of
      EVP_MD_CTX.  This makes pgcrypto crash in functions which
      re-use one digest context several times: hmac() and crypt()
      with md5 algorithm.
      
      Following patch fixes it by carring the digest info around
      EVP_DigestFinal and re-initializing cipher.
      
      Marko Kreen.
      919594f3
  19. Nov 29, 2003
    • PostgreSQL Daemon's avatar
      · 55b11325
      PostgreSQL Daemon authored
      make sure the $Id tags are converted to $PostgreSQL as well ...
      55b11325
  20. Aug 04, 2003
  21. Nov 15, 2002
  22. Nov 20, 2001
  23. Nov 05, 2001
  24. Oct 28, 2001
  25. Oct 25, 2001
  26. Sep 23, 2001
    • Bruce Momjian's avatar
      Big thanks to Solar Designer who pointed out a bug in bcrypt · ab560228
      Bruce Momjian authored
      salt generation code.  He also urged using better random source
      and making possible to choose using bcrypt and xdes rounds more
      easily.  So, here's patch:
      
      * For all salt generation, use Solar Designer's own code.  This
        is mostly due fact that his code is more fit for get_random_bytes()
        style interface.
      * New function: gen_salt(type, rounds).  This lets specify iteration
        count for algorithm.
      * random.c: px_get_random_bytes() function.
        Supported randomness soure: /dev/urandom, OpenSSL PRNG, libc random()
        Default: /dev/urandom.
      * Draft description of C API for pgcrypto functions.
      
      New files: API, crypt-gensalt.c, random.c
      
      Marko Kreen
      ab560228
  27. Aug 21, 2001
    • Bruce Momjian's avatar
      /contrib/pgcrypto: · 2518e273
      Bruce Momjian authored
      * remove support for encode() as it is in main tree now
      * remove krb5.c
      * new 'PX library' architecture
      * remove BSD license from my code to let the general
        PostgreSQL one to apply
      * md5, sha1: ANSIfy, use const where appropriate
      * various other formatting and clarity changes
      * hmac()
      * UN*X-like crypt() - system or internal crypt
      * Internal crypt: DES, Extended DES, MD5, Blowfish
        crypt-des.c, crypt-md5.c from FreeBSD
        crypt-blowfish.c from Solar Designer
      * gen_salt() for crypt() -  Blowfish, MD5, DES, Extended DES
      * encrypt(), decrypt(), encrypt_iv(), decrypt_iv()
      * Cipher support in mhash.c, openssl.c
      * internal: Blowfish, Rijndael-128 ciphers
      * blf.[ch], rijndael.[ch] from OpenBSD
      * there will be generated file rijndael-tbl.inc.
      
      Marko Kreen
      2518e273
  28. Mar 22, 2001
  29. Feb 10, 2001
    • Tom Lane's avatar
      Restructure the key include files per recent pghackers discussion: there · d08741ea
      Tom Lane authored
      are now separate files "postgres.h" and "postgres_fe.h", which are meant
      to be the primary include files for backend .c files and frontend .c files
      respectively.  By default, only include files meant for frontend use are
      installed into the installation include directory.  There is a new make
      target 'make install-all-headers' that adds the whole content of the
      src/include tree to the installed fileset, for use by people who want to
      develop server-side code without keeping the complete source tree on hand.
      Cleaned up a whole lot of crufty and inconsistent header inclusions.
      d08741ea
  30. Oct 31, 2000
Loading