Revision 8d0a4f99 lib/http/__init__.py

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

  

Also available in: Unified diff