[pgsql-jp: 37316] PGClusterでencrypt('XXX', 'YYY', 'des-cbc')を実行できるのか?

takashi matsukaze shohu33 @ gmail.com
2006年 6月 30日 (金) 02:31:38 JST


松風と申します。

PGClusterでpgcryptoをインストールし、encrypt('XXX', 'YYY', 'des-cbc')を実行することはできますでしょうか?

※ encryptの第3引数に"des-cbc"を指定しています。

現在OpenSSL, PGClusterをインストールした後に、pgcryptoのインストール、その後の確認(make
installcheck)を行っていますが、ほとんどのアルゴリズム?項目がFailedになってしまいます。
(結果1)

ちなみにこの状態で "psql dbname < pgcrypto.sql" を行った後に、psql
のプロンプトにてencrypt()を実行するとエラーが出て実行することができません。
(結果2)

環境、インストールした手順を後述致します。

■結果1

============== running regression test queries        ==============
test init                 ... ok
test md5                  ... FAILED
test sha1                 ... FAILED
test hmac-md5             ... FAILED
test hmac-sha1            ... FAILED
test blowfish             ... FAILED
test rijndael             ... FAILED
test des                  ... FAILED
test 3des                 ... FAILED
test cast5                ... FAILED
test crypt-des            ... FAILED
test crypt-md5            ... FAILED
test crypt-blowfish       ... FAILED
test crypt-xdes           ... FAILED
test pgp-armor            ... FAILED
test pgp-decrypt          ... FAILED
test pgp-encrypt          ... FAILED
test pgp-compression      ... FAILED
test pgp-pubkey-decrypt   ... ok
test pgp-pubkey-encrypt   ... FAILED
test pgp-info             ... FAILED

========================
 19 of 21 tests failed.

■結果2

# psql dbname

dbname=# select encrypt( '1あ', 'KEY', 'des-cbc');
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!> \q
[postgres @ localhost pgcrypto]$

■環境

Fedora Core 5
PGCluster-1.5.0rc7
openssl-0.9.7e

■インストール手順

## configureやmakeでは特にエラーは出ておりませんでした。

1.OpenSSLインストール ---

$ cd ./openssl-0.9.7e
$ ./config shared
$ make
$ make test
$ su
# make install
# rm /usr/local/ssl/lib/libfips.so

 /etc/ld.so.conf に以下記述を追加

 /usr/local/ssl/lib

# ldconfig

2.PGClusterインストール ---

$ cd ./pgcluster-1.5.0rc7

★★★ configureでは、encrypt()でdes-cbcを使用したいため、--with-opensslオプションを指定してます

$ ./configure --with-pam --enable-syslog
--prefix=/usr/local/pgcls_1_5_0 --with-openssl --with-pgport=5433
$ make
$ su
# make install

.bash_profileの変更

 以下記載を追加

 export PATH=$PATH:/usr/local/pgcls_1_5_0/bin
 export MANPATH=$MANPATH:/usr/local/pgcls_1_5_0/man
 export PGDATA=/home/postgres/data

# exit
$ source ~postgres/.bash_profile

3.データベース作成 ---

$ initdb -E EUC_JP --no-locale

initdbで作成したdataフォルダ配下のCluster.confを変更
 <When_Stand_Alone> read_only  </When_Stand_Alone>
           ↓↓↓
 <When_Stand_Alone> read_write  </When_Stand_Alone>

$ cd ~postgres
$ pg_ctl -D data start
$ createdb -E EUC_JP -O postgres dbname

4.pgcryptoインストール ---

$ cd ./pgcluster-1.5.0rc7/contrib/pgcrypto/
$ make clean
$ make
$ su
# make install
# exit
$ make installcheck

上記を実行すると、結果1が表示されてしまいます。




以上、宜しくお願い致します。



pgsql-jp メーリングリストの案内