55SET bytea_output TO escape;
66select pgp_sym_decrypt(pgp_sym_encrypt('Secret.', 'key'), 'key');
77ERROR: generating random data is not supported by this build
8- DETAIL: This functionality requires a source of strong random numbers
9- HINT: You need to rebuild PostgreSQL using --enable-strong-random
8+ DETAIL: This functionality requires a source of strong random numbers.
9+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
1010-- check whether the defaults are ok
1111select pgp_sym_decrypt(pgp_sym_encrypt('Secret.', 'key'),
1212 'key', 'expect-cipher-algo=aes128,
@@ -17,8 +17,8 @@ select pgp_sym_decrypt(pgp_sym_encrypt('Secret.', 'key'),
1717 expect-compress-algo=0
1818 ');
1919ERROR: generating random data is not supported by this build
20- DETAIL: This functionality requires a source of strong random numbers
21- HINT: You need to rebuild PostgreSQL using --enable-strong-random
20+ DETAIL: This functionality requires a source of strong random numbers.
21+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
2222-- maybe the expect- stuff simply does not work
2323select pgp_sym_decrypt(pgp_sym_encrypt('Secret.', 'key'),
2424 'key', 'expect-cipher-algo=bf,
@@ -29,133 +29,133 @@ select pgp_sym_decrypt(pgp_sym_encrypt('Secret.', 'key'),
2929 expect-compress-algo=1
3030 ');
3131ERROR: generating random data is not supported by this build
32- DETAIL: This functionality requires a source of strong random numbers
33- HINT: You need to rebuild PostgreSQL using --enable-strong-random
32+ DETAIL: This functionality requires a source of strong random numbers.
33+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
3434-- bytea as text
3535select pgp_sym_decrypt(pgp_sym_encrypt_bytea('Binary', 'baz'), 'baz');
3636ERROR: generating random data is not supported by this build
37- DETAIL: This functionality requires a source of strong random numbers
38- HINT: You need to rebuild PostgreSQL using --enable-strong-random
37+ DETAIL: This functionality requires a source of strong random numbers.
38+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
3939-- text as bytea
4040select pgp_sym_decrypt_bytea(pgp_sym_encrypt('Text', 'baz'), 'baz');
4141ERROR: generating random data is not supported by this build
42- DETAIL: This functionality requires a source of strong random numbers
43- HINT: You need to rebuild PostgreSQL using --enable-strong-random
42+ DETAIL: This functionality requires a source of strong random numbers.
43+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
4444-- algorithm change
4545select pgp_sym_decrypt(
4646 pgp_sym_encrypt('Secret.', 'key', 'cipher-algo=bf'),
4747 'key', 'expect-cipher-algo=bf');
4848ERROR: generating random data is not supported by this build
49- DETAIL: This functionality requires a source of strong random numbers
50- HINT: You need to rebuild PostgreSQL using --enable-strong-random
49+ DETAIL: This functionality requires a source of strong random numbers.
50+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
5151select pgp_sym_decrypt(
5252 pgp_sym_encrypt('Secret.', 'key', 'cipher-algo=aes'),
5353 'key', 'expect-cipher-algo=aes128');
5454ERROR: generating random data is not supported by this build
55- DETAIL: This functionality requires a source of strong random numbers
56- HINT: You need to rebuild PostgreSQL using --enable-strong-random
55+ DETAIL: This functionality requires a source of strong random numbers.
56+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
5757select pgp_sym_decrypt(
5858 pgp_sym_encrypt('Secret.', 'key', 'cipher-algo=aes192'),
5959 'key', 'expect-cipher-algo=aes192');
6060ERROR: generating random data is not supported by this build
61- DETAIL: This functionality requires a source of strong random numbers
62- HINT: You need to rebuild PostgreSQL using --enable-strong-random
61+ DETAIL: This functionality requires a source of strong random numbers.
62+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
6363-- s2k change
6464select pgp_sym_decrypt(
6565 pgp_sym_encrypt('Secret.', 'key', 's2k-mode=0'),
6666 'key', 'expect-s2k-mode=0');
6767ERROR: generating random data is not supported by this build
68- DETAIL: This functionality requires a source of strong random numbers
69- HINT: You need to rebuild PostgreSQL using --enable-strong-random
68+ DETAIL: This functionality requires a source of strong random numbers.
69+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
7070select pgp_sym_decrypt(
7171 pgp_sym_encrypt('Secret.', 'key', 's2k-mode=1'),
7272 'key', 'expect-s2k-mode=1');
7373ERROR: generating random data is not supported by this build
74- DETAIL: This functionality requires a source of strong random numbers
75- HINT: You need to rebuild PostgreSQL using --enable-strong-random
74+ DETAIL: This functionality requires a source of strong random numbers.
75+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
7676select pgp_sym_decrypt(
7777 pgp_sym_encrypt('Secret.', 'key', 's2k-mode=3'),
7878 'key', 'expect-s2k-mode=3');
7979ERROR: generating random data is not supported by this build
80- DETAIL: This functionality requires a source of strong random numbers
81- HINT: You need to rebuild PostgreSQL using --enable-strong-random
80+ DETAIL: This functionality requires a source of strong random numbers.
81+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
8282-- s2k count change
8383select pgp_sym_decrypt(
8484 pgp_sym_encrypt('Secret.', 'key', 's2k-count=1024'),
8585 'key', 'expect-s2k-count=1024');
8686ERROR: generating random data is not supported by this build
87- DETAIL: This functionality requires a source of strong random numbers
88- HINT: You need to rebuild PostgreSQL using --enable-strong-random
87+ DETAIL: This functionality requires a source of strong random numbers.
88+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
8989-- s2k_count rounds up
9090select pgp_sym_decrypt(
9191 pgp_sym_encrypt('Secret.', 'key', 's2k-count=65000000'),
9292 'key', 'expect-s2k-count=65000000');
9393ERROR: generating random data is not supported by this build
94- DETAIL: This functionality requires a source of strong random numbers
95- HINT: You need to rebuild PostgreSQL using --enable-strong-random
94+ DETAIL: This functionality requires a source of strong random numbers.
95+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
9696-- s2k digest change
9797select pgp_sym_decrypt(
9898 pgp_sym_encrypt('Secret.', 'key', 's2k-digest-algo=md5'),
9999 'key', 'expect-s2k-digest-algo=md5');
100100ERROR: generating random data is not supported by this build
101- DETAIL: This functionality requires a source of strong random numbers
102- HINT: You need to rebuild PostgreSQL using --enable-strong-random
101+ DETAIL: This functionality requires a source of strong random numbers.
102+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
103103select pgp_sym_decrypt(
104104 pgp_sym_encrypt('Secret.', 'key', 's2k-digest-algo=sha1'),
105105 'key', 'expect-s2k-digest-algo=sha1');
106106ERROR: generating random data is not supported by this build
107- DETAIL: This functionality requires a source of strong random numbers
108- HINT: You need to rebuild PostgreSQL using --enable-strong-random
107+ DETAIL: This functionality requires a source of strong random numbers.
108+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
109109-- sess key
110110select pgp_sym_decrypt(
111111 pgp_sym_encrypt('Secret.', 'key', 'sess-key=0'),
112112 'key', 'expect-sess-key=0');
113113ERROR: generating random data is not supported by this build
114- DETAIL: This functionality requires a source of strong random numbers
115- HINT: You need to rebuild PostgreSQL using --enable-strong-random
114+ DETAIL: This functionality requires a source of strong random numbers.
115+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
116116select pgp_sym_decrypt(
117117 pgp_sym_encrypt('Secret.', 'key', 'sess-key=1'),
118118 'key', 'expect-sess-key=1');
119119ERROR: generating random data is not supported by this build
120- DETAIL: This functionality requires a source of strong random numbers
121- HINT: You need to rebuild PostgreSQL using --enable-strong-random
120+ DETAIL: This functionality requires a source of strong random numbers.
121+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
122122select pgp_sym_decrypt(
123123 pgp_sym_encrypt('Secret.', 'key', 'sess-key=1, cipher-algo=bf'),
124124 'key', 'expect-sess-key=1, expect-cipher-algo=bf');
125125ERROR: generating random data is not supported by this build
126- DETAIL: This functionality requires a source of strong random numbers
127- HINT: You need to rebuild PostgreSQL using --enable-strong-random
126+ DETAIL: This functionality requires a source of strong random numbers.
127+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
128128select pgp_sym_decrypt(
129129 pgp_sym_encrypt('Secret.', 'key', 'sess-key=1, cipher-algo=aes192'),
130130 'key', 'expect-sess-key=1, expect-cipher-algo=aes192');
131131ERROR: generating random data is not supported by this build
132- DETAIL: This functionality requires a source of strong random numbers
133- HINT: You need to rebuild PostgreSQL using --enable-strong-random
132+ DETAIL: This functionality requires a source of strong random numbers.
133+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
134134select pgp_sym_decrypt(
135135 pgp_sym_encrypt('Secret.', 'key', 'sess-key=1, cipher-algo=aes256'),
136136 'key', 'expect-sess-key=1, expect-cipher-algo=aes256');
137137ERROR: generating random data is not supported by this build
138- DETAIL: This functionality requires a source of strong random numbers
139- HINT: You need to rebuild PostgreSQL using --enable-strong-random
138+ DETAIL: This functionality requires a source of strong random numbers.
139+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
140140-- no mdc
141141select pgp_sym_decrypt(
142142 pgp_sym_encrypt('Secret.', 'key', 'disable-mdc=1'),
143143 'key', 'expect-disable-mdc=1');
144144ERROR: generating random data is not supported by this build
145- DETAIL: This functionality requires a source of strong random numbers
146- HINT: You need to rebuild PostgreSQL using --enable-strong-random
145+ DETAIL: This functionality requires a source of strong random numbers.
146+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
147147-- crlf
148148select encode(pgp_sym_decrypt_bytea(
149149 pgp_sym_encrypt(E'1\n2\n3\r\n', 'key', 'convert-crlf=1'),
150150 'key'), 'hex');
151151ERROR: generating random data is not supported by this build
152- DETAIL: This functionality requires a source of strong random numbers
153- HINT: You need to rebuild PostgreSQL using --enable-strong-random
152+ DETAIL: This functionality requires a source of strong random numbers.
153+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
154154-- conversion should be lossless
155155select encode(digest(pgp_sym_decrypt(
156156 pgp_sym_encrypt(E'\r\n0\n1\r\r\n\n2\r', 'key', 'convert-crlf=1'),
157157 'key', 'convert-crlf=1'), 'sha1'), 'hex') as result,
158158 encode(digest(E'\r\n0\n1\r\r\n\n2\r', 'sha1'), 'hex') as expect;
159159ERROR: generating random data is not supported by this build
160- DETAIL: This functionality requires a source of strong random numbers
161- HINT: You need to rebuild PostgreSQL using --enable-strong-random
160+ DETAIL: This functionality requires a source of strong random numbers.
161+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
0 commit comments