Main Page | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Related Pages

crypto_stub.c

00001 /*-
00002  * See the file LICENSE for redistribution information.
00003  *
00004  * Copyright (c) 1996-2005
00005  *      Sleepycat Software.  All rights reserved.
00006  *
00007  * $Id: crypto_stub.c,v 12.2 2005/07/20 16:50:55 bostic Exp $
00008  */
00009 
00010 #include "db_config.h"
00011 
00012 #include "db_int.h"
00013 
00014 /*
00015  * __crypto_region_init --
00016  *      Initialize crypto.
00017  *
00018  *
00019  * !!!
00020  * We don't put this stub file in the crypto/ directory of the distribution
00021  * because that entire directory is removed for non-crypto distributions.
00022  *
00023  * PUBLIC: int __crypto_region_init __P((DB_ENV *));
00024  */
00025 int
00026 __crypto_region_init(dbenv)
00027         DB_ENV *dbenv;
00028 {
00029         REGENV *renv;
00030         REGINFO *infop;
00031         int ret;
00032 
00033         infop = dbenv->reginfo;
00034         renv = infop->primary;
00035         MUTEX_LOCK(dbenv, renv->mtx_regenv);
00036         ret = !(renv->cipher_off == INVALID_ROFF);
00037         MUTEX_UNLOCK(dbenv, renv->mtx_regenv);
00038 
00039         if (ret == 0)
00040                 return (0);
00041 
00042         __db_err(dbenv,
00043 "Encrypted environment: library build did not include cryptography support");
00044         return (DB_OPNOTSUP);
00045 }

Generated on Sun Dec 25 12:14:17 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2