import sys

__version__ = '0.9.1'

ENCODINGS = ['Base64',
             'Base64 URL',
             'Base32',
             'Hex',
             'URL',
             'HTML',
             'Rot13',
             'UTF8',
             'UTF16']

COMPRESSIONS = ['Gzip',
                'Bz2']

HASHS = ['MD5',
         'SHA1',
         'SHA224',
         'SHA256',
         'SHA384',
         'SHA512',
         'RIPEMD160',
         'MD4',
         'MDC2',
         'NTLM',
         'Whirlpool']

MISC = ['X509Certificate']

FORMATTERS = ['XML',
              'HTML',
              'JSON']

# Add features based on Python version
if sys.version_info.major == 3:
    if sys.version_info.minor >= 6:
        HASHS.append('BLAKE2b')
        HASHS.append('BLAKE2s')
    if sys.version_info.minor >= 4:
        ENCODINGS.insert(3, 'Base85')

import sys

__version__ = '0.9.2'

ENCODINGS = ['Base64',
             'Base64 URL',
             'Base32',
             'Hex',
             'URL',
             'HTML',
             'Rot13',
             'UTF8',
             'UTF16']

COMPRESSIONS = ['Gzip',
                'Bz2']

HASHS = ['MD5',
         'SHA1',
         'SHA224',
         'SHA256',
         'SHA384',
         'SHA512',
         'RIPEMD160',
         'MD4',
         'MDC2',
         'NTLM',
         'Whirlpool']

MISC = []

try:
    import OpenSSL.crypto
except ImportError:
    pass
else:
    MISC.append('X509Certificate')

FORMATTERS = ['XML',
              'HTML',
              'JSON']

# Add features based on Python version
if sys.version_info.major == 3:
    if sys.version_info.minor >= 6:
        HASHS.append('BLAKE2b')
        HASHS.append('BLAKE2s')
    if sys.version_info.minor >= 4:
        ENCODINGS.insert(3, 'Base85')

Add X509 support only when pyOpenSSL is installed
Add X509 support only when pyOpenSSL is installed

  import sys
  
- __version__ = '0.9.1'
+ __version__ = '0.9.2'
  
  ENCODINGS = ['Base64',
               'Base64 URL',
               'Base32',
               'Hex',
               'URL',
               'HTML',
               'Rot13',
               'UTF8',
               'UTF16']
  
  COMPRESSIONS = ['Gzip',
                  'Bz2']
  
  HASHS = ['MD5',
           'SHA1',
           'SHA224',
           'SHA256',
           'SHA384',
           'SHA512',
           'RIPEMD160',
           'MD4',
           'MDC2',
           'NTLM',
           'Whirlpool']
  
- MISC = ['X509Certificate']
+ MISC = []
+ 
+ try:
+     import OpenSSL.crypto
+ except ImportError:
+     pass
+ else:
+     MISC.append('X509Certificate')
  
  FORMATTERS = ['XML',
                'HTML',
                'JSON']
  
  # Add features based on Python version
  if sys.version_info.major == 3:
      if sys.version_info.minor >= 6:
          HASHS.append('BLAKE2b')
          HASHS.append('BLAKE2s')
      if sys.version_info.minor >= 4:
          ENCODINGS.insert(3, 'Base85')
  
Add X509 support only when pyOpenSSL is installed
## Code Before:
import sys

__version__ = '0.9.1'

ENCODINGS = ['Base64',
             'Base64 URL',
             'Base32',
             'Hex',
             'URL',
             'HTML',
             'Rot13',
             'UTF8',
             'UTF16']

COMPRESSIONS = ['Gzip',
                'Bz2']

HASHS = ['MD5',
         'SHA1',
         'SHA224',
         'SHA256',
         'SHA384',
         'SHA512',
         'RIPEMD160',
         'MD4',
         'MDC2',
         'NTLM',
         'Whirlpool']

MISC = ['X509Certificate']

FORMATTERS = ['XML',
              'HTML',
              'JSON']

# Add features based on Python version
if sys.version_info.major == 3:
    if sys.version_info.minor >= 6:
        HASHS.append('BLAKE2b')
        HASHS.append('BLAKE2s')
    if sys.version_info.minor >= 4:
        ENCODINGS.insert(3, 'Base85')

## Instruction:
Add X509 support only when pyOpenSSL is installed
## Code After:
import sys

__version__ = '0.9.2'

ENCODINGS = ['Base64',
             'Base64 URL',
             'Base32',
             'Hex',
             'URL',
             'HTML',
             'Rot13',
             'UTF8',
             'UTF16']

COMPRESSIONS = ['Gzip',
                'Bz2']

HASHS = ['MD5',
         'SHA1',
         'SHA224',
         'SHA256',
         'SHA384',
         'SHA512',
         'RIPEMD160',
         'MD4',
         'MDC2',
         'NTLM',
         'Whirlpool']

MISC = []

try:
    import OpenSSL.crypto
except ImportError:
    pass
else:
    MISC.append('X509Certificate')

FORMATTERS = ['XML',
              'HTML',
              'JSON']

# Add features based on Python version
if sys.version_info.major == 3:
    if sys.version_info.minor >= 6:
        HASHS.append('BLAKE2b')
        HASHS.append('BLAKE2s')
    if sys.version_info.minor >= 4:
        ENCODINGS.insert(3, 'Base85')
