Revision 8d0a4f99

b/lib/http/__init__.py
545 545
    raise HttpError("Error in SSL handshake: %s" % err)
546 546

  
547 547

  
548
def InitSsl():
549
  """Initializes the SSL infrastructure.
550

  
551
  This function is idempotent.
552

  
553
  """
554
  if not OpenSSL.rand.status():
555
    raise EnvironmentError("OpenSSL could not collect enough entropy"
556
                           " for the PRNG")
557

  
558
  # TODO: Maybe add some additional seeding for OpenSSL's PRNG
559

  
560

  
548 561
class HttpSslParams(object):
549 562
  """Data class for SSL key and certificate.
550 563

  
b/lib/rpc.py
59 59

  
60 60
  assert not _http_manager, "RPC module initialized more than once"
61 61

  
62
  http.InitSsl()
63

  
62 64
  _http_manager = http.client.HttpClientManager()
63 65

  
64 66

  

Also available in: Unified diff