
/* 

        Copyright (C) 1999
        Free Software Foundation, Inc.

   This file is part of GNU cfengine - written and maintained 
   by Mark Burgess, Dept of Computing and Engineering, Oslo College,
   Dept. of Theoretical physics, University of Oslo
 
   This program is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
   Free Software Foundation; either version 2, or (at your option) any
   later version.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
 
  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA

*/


/*****************************************************************************/
/*                                                                           */
/* File: cfkey.c                                                             */
/*                                                                           */
/*****************************************************************************/

#include "cf.defs.h"
#include "cf.extern.h"

#ifdef HAVE_LIBCRYPTO
#include <openssl/des.h>
#endif

char CFLOCK[bufsize];

int main()

{ char digest[16];
  unsigned char seed[8],key[8];
  int sp;
 
#ifdef HAVE_LIBCRYPTO
 DESMD5Random(digest);
 bcopy(digest,seed,8);
 des_random_seed(&seed);
 des_random_key(&key);
 for (sp = 0; sp < 8; sp++)
    putchar(key[sp]);
 des_random_key(&key);
 for (sp = 0; sp < 8; sp++)
    putchar(key[sp]);
 des_random_key(&key);
 for (sp = 0; sp < 8; sp++)
    putchar(key[sp]);
#else
 printf("Cfengine was not compiled with SSL suport.\n");
#endif
 return 0;
}

/*****/

void AddMultipleClasses(classlist)

char *classlist;

{
}

void ReleaseCurrentLock()
{
}
