File: pgp-pubkey-encrypt_1.out

package info (click to toggle)
postgresql-11 11.16-0%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 143,648 kB
  • sloc: ansic: 819,646; sql: 85,616; yacc: 33,032; xml: 31,044; perl: 25,261; lex: 8,166; makefile: 5,038; sh: 4,631; cpp: 712; python: 121; asm: 65; sed: 15
file content (62 lines) | stat: -rw-r--r-- 2,554 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
--
-- PGP Public Key Encryption
--
-- ensure consistent test output regardless of the default bytea format
SET bytea_output TO escape;
-- successful encrypt/decrypt
select pgp_pub_decrypt(
	pgp_pub_encrypt('Secret msg', dearmor(pubkey)),
	dearmor(seckey))
from keytbl where keytbl.id=1;
ERROR:  generating random data is not supported by this build
DETAIL:  This functionality requires a source of strong random numbers.
HINT:  You need to rebuild PostgreSQL using --enable-strong-random.
select pgp_pub_decrypt(
		pgp_pub_encrypt('Secret msg', dearmor(pubkey)),
		dearmor(seckey))
from keytbl where keytbl.id=2;
ERROR:  generating random data is not supported by this build
DETAIL:  This functionality requires a source of strong random numbers.
HINT:  You need to rebuild PostgreSQL using --enable-strong-random.
select pgp_pub_decrypt(
		pgp_pub_encrypt('Secret msg', dearmor(pubkey)),
		dearmor(seckey))
from keytbl where keytbl.id=3;
ERROR:  generating random data is not supported by this build
DETAIL:  This functionality requires a source of strong random numbers.
HINT:  You need to rebuild PostgreSQL using --enable-strong-random.
select pgp_pub_decrypt(
		pgp_pub_encrypt('Secret msg', dearmor(pubkey)),
		dearmor(seckey))
from keytbl where keytbl.id=6;
ERROR:  generating random data is not supported by this build
DETAIL:  This functionality requires a source of strong random numbers.
HINT:  You need to rebuild PostgreSQL using --enable-strong-random.
-- try with rsa-sign only
select pgp_pub_decrypt(
		pgp_pub_encrypt('Secret msg', dearmor(pubkey)),
		dearmor(seckey))
from keytbl where keytbl.id=4;
ERROR:  No encryption key found
-- try with secret key
select pgp_pub_decrypt(
		pgp_pub_encrypt('Secret msg', dearmor(seckey)),
		dearmor(seckey))
from keytbl where keytbl.id=1;
ERROR:  Refusing to encrypt with secret key
-- does text-to-bytea works
select pgp_pub_decrypt_bytea(
		pgp_pub_encrypt('Secret msg', dearmor(pubkey)),
		dearmor(seckey))
from keytbl where keytbl.id=1;
ERROR:  generating random data is not supported by this build
DETAIL:  This functionality requires a source of strong random numbers.
HINT:  You need to rebuild PostgreSQL using --enable-strong-random.
-- and bytea-to-text?
select pgp_pub_decrypt(
		pgp_pub_encrypt_bytea('Secret msg', dearmor(pubkey)),
		dearmor(seckey))
from keytbl where keytbl.id=1;
ERROR:  generating random data is not supported by this build
DETAIL:  This functionality requires a source of strong random numbers.
HINT:  You need to rebuild PostgreSQL using --enable-strong-random.