~ubuntu-branches/ubuntu/maverick/openssl/maverick

« back to all changes in this revision

Viewing changes to crypto/rand/rand_lib.c

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Martin
  • Date: 2004-12-16 18:41:29 UTC
  • mto: (11.1.1 lenny)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20041216184129-z7xjkul57mh1jiha
Tags: upstream-0.9.7e
ImportĀ upstreamĀ versionĀ 0.9.7e

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
#ifndef OPENSSL_NO_ENGINE
64
64
#include <openssl/engine.h>
65
65
#endif
 
66
#include <openssl/fips.h>
 
67
#include <openssl/fips_rand.h>
66
68
 
67
69
#ifndef OPENSSL_NO_ENGINE
68
70
/* non-NULL if default_RAND_meth is ENGINE-provided */
85
87
 
86
88
const RAND_METHOD *RAND_get_rand_method(void)
87
89
        {
 
90
#ifdef OPENSSL_FIPS
 
91
        if(FIPS_mode()
 
92
                && default_RAND_meth != FIPS_rand_check())
 
93
            {
 
94
            RANDerr(RAND_F_RAND_GET_RAND_METHOD,RAND_R_NON_FIPS_METHOD);
 
95
            return 0;
 
96
            }
 
97
#endif
 
98
 
 
99
 
88
100
        if (!default_RAND_meth)
89
101
                {
90
102
#ifndef OPENSSL_NO_ENGINE