~ubuntu-branches/ubuntu/trusty/postgresql-8.4/trusty

« back to all changes in this revision

Viewing changes to contrib/pgcrypto/pgp-pubkey.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-11 16:59:35 UTC
  • mfrom: (5.1.1 karmic)
  • Revision ID: james.westby@ubuntu.com-20090711165935-jfwin6gfrxf0gfsi
Tags: 8.4.0-2
* debian/libpq-dev.install: Ship catalog/genbki.h. (Closes: #536139)
* debian/rules: Drop --enable-cassert for final release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27
27
 * SUCH DAMAGE.
28
28
 *
29
 
 * $PostgreSQL: pgsql/contrib/pgcrypto/pgp-pubkey.c,v 1.4 2005/10/15 02:49:06 momjian Exp $
 
29
 * $PostgreSQL: pgsql/contrib/pgcrypto/pgp-pubkey.c,v 1.5 2009/06/11 14:48:52 momjian Exp $
30
30
 */
31
31
#include "postgres.h"
32
32
 
35
35
#include "pgp.h"
36
36
 
37
37
int
38
 
pgp_key_alloc(PGP_PubKey ** pk_p)
 
38
pgp_key_alloc(PGP_PubKey **pk_p)
39
39
{
40
40
        PGP_PubKey *pk;
41
41
 
46
46
}
47
47
 
48
48
void
49
 
pgp_key_free(PGP_PubKey * pk)
 
49
pgp_key_free(PGP_PubKey *pk)
50
50
{
51
51
        if (pk == NULL)
52
52
                return;
82
82
}
83
83
 
84
84
static int
85
 
calc_key_id(PGP_PubKey * pk)
 
85
calc_key_id(PGP_PubKey *pk)
86
86
{
87
87
        int                     res;
88
88
        PX_MD      *md;
156
156
}
157
157
 
158
158
int
159
 
_pgp_read_public_key(PullFilter * pkt, PGP_PubKey ** pk_p)
 
159
_pgp_read_public_key(PullFilter *pkt, PGP_PubKey **pk_p)
160
160
{
161
161
        int                     res;
162
162
        PGP_PubKey *pk;
251
251
#define HIDE_SHA1 254
252
252
 
253
253
static int
254
 
check_key_sha1(PullFilter * src, PGP_PubKey * pk)
 
254
check_key_sha1(PullFilter *src, PGP_PubKey *pk)
255
255
{
256
256
        int                     res;
257
257
        uint8           got_sha1[20];
297
297
}
298
298
 
299
299
static int
300
 
check_key_cksum(PullFilter * src, PGP_PubKey * pk)
 
300
check_key_cksum(PullFilter *src, PGP_PubKey *pk)
301
301
{
302
302
        int                     res;
303
303
        unsigned        got_cksum,
335
335
}
336
336
 
337
337
static int
338
 
process_secret_key(PullFilter * pkt, PGP_PubKey ** pk_p,
 
338
process_secret_key(PullFilter *pkt, PGP_PubKey **pk_p,
339
339
                                   const uint8 *key, int key_len)
340
340
{
341
341
        int                     res;
456
456
}
457
457
 
458
458
static int
459
 
internal_read_key(PullFilter * src, PGP_PubKey ** pk_p,
 
459
internal_read_key(PullFilter *src, PGP_PubKey **pk_p,
460
460
                                  const uint8 *psw, int psw_len, int pubtype)
461
461
{
462
462
        PullFilter *pkt = NULL;
563
563
}
564
564
 
565
565
int
566
 
pgp_set_pubkey(PGP_Context * ctx, MBuf * keypkt,
 
566
pgp_set_pubkey(PGP_Context *ctx, MBuf *keypkt,
567
567
                           const uint8 *key, int key_len, int pubtype)
568
568
{
569
569
        int                     res;