1/*- 2 * See the file LICENSE for redistribution information. 3 * 4 * Copyright (c) 1996,2008 Oracle. All rights reserved. 5 * 6 * $Id: crypto_stub.c,v 12.9 2008/01/08 20:58:08 bostic Exp $ 7 */ 8 9#include "db_config.h" 10 11#include "db_int.h" 12 13/* 14 * __crypto_region_init -- 15 * Initialize crypto. 16 * 17 * 18 * !!! 19 * We don't put this stub file in the crypto/ directory of the distribution 20 * because that entire directory is removed for non-crypto distributions. 21 * 22 * PUBLIC: int __crypto_region_init __P((ENV *)); 23 */ 24int 25__crypto_region_init(env) 26 ENV *env; 27{ 28 REGENV *renv; 29 REGINFO *infop; 30 int ret; 31 32 infop = env->reginfo; 33 renv = infop->primary; 34 MUTEX_LOCK(env, renv->mtx_regenv); 35 ret = !(renv->cipher_off == INVALID_ROFF); 36 MUTEX_UNLOCK(env, renv->mtx_regenv); 37 38 if (ret == 0) 39 return (0); 40 41 __db_errx(env, 42"Encrypted environment: library build did not include cryptography support"); 43 return (DB_OPNOTSUP); 44} 45