parameters: (pem_filename)
return_statement: return base64.decode('base64')
docstring: Decodes the first PEM-encoded certificate in a given file into binary
  
    Args:
      pem_filename: A filename that contains a PEM-encoded certificate. It may
          contain additional data (keys, textual representation) which will be
          ignored
  
    Returns:
      A byte array containing the decoded certificate data
docstring_summary: Decodes the first PEM-encoded certificate in a given file into binary
docstring_tokens: Decodes the first PEM - encoded certificate in a given file into binary
function: def _pem_cert_to_binary(pem_filename):
    """Decodes the first PEM-encoded certificate in a given file into binary
  
    Args:
      pem_filename: A filename that contains a PEM-encoded certificate. It may
          contain additional data (keys, textual representation) which will be
          ignored
  
    Returns:
      A byte array containing the decoded certificate data
    """
    base64 = ""
    started = False
  
    with open(pem_filename, 'r') as pem_file:
      for line in pem_file:
        if not started:
          if line.startswith('-----BEGIN CERTIFICATE'):
            started = True
        else:
          if line.startswith('-----END CERTIFICATE'):
            break
          base64 += line[:-1].strip()
  
    return base64.decode('base64')
function_tokens: def _pem_cert_to_binary ( pem_filename ) : base64 = "" started = False with open ( pem_filename , 'r' ) as pem_file : for line in pem_file : if not started : if line . startswith ( '-----BEGIN CERTIFICATE' ) : started = True else : if line . startswith ( '-----END CERTIFICATE' ) : break base64 += line [ : - 1 ] . strip ( ) return base64 . decode ( 'base64' )