On Fri, May 04, 2012 at 08:39:04AM -0400, Paul Moore wrote: > On Friday, May 04, 2012 04:01:09 AM Roman Drahtmueller wrote:
> > Two problems: > > 1) openssl may not come with FIPS support. proc file is ignored. > > 2) openssl may run in FIPS mode for reasons other than fips=1 on the > > kernel cmdline (environment, ...). > > > > Suggested way to handle this: > > > > 1) compile-time check if <openssl/fips.h> exists. > > Ignore fips specifics if not, otherwise: > > 2) use int FIPS_mode(void) for what it's there: > > > > #ifdef _QEMU_FIPS /* or whatever */ > > #include <openssl/fips.h> > > vs->fips = FIPS_mode(); > > #endif > > > > and skip fips_enabled(void). > > > > Much easier! QEMU does not use OpenSSL for anything [1], it uses GNUTLS, so I would not be in favour of using OpenSSL for this. Daniel [1] Yes the libspice-server.so uses OpenSSL which is a shame, but that can be sorted out one day. -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|