FreeBSD/contrib/subversion/subversion/svn/auth-cmd.c
/* decodes from format we store certs in for auth creds and
 * turns parsing errors into warnings if PRINT_WARNING is TRUE
 * and ignores them otherwise. returns NULL if it couldn't
 * parse a cert for any reason. */
decodes from format we store certs in for auth creds and
turns parsing errors into warnings if PRINT_WARNING is TRUE
and ignores them otherwise. returns NULL if it couldn't
parse a cert for any reason.
decodes from format we store certs in for auth creds and turns parsing errors into warnings if PRINT_WARNING is TRUE and ignores them otherwise . returns NULL if it couldn ' t parse a cert for any reason .
static svn_x509_certinfo_t *
parse_certificate(const svn_string_t *ascii_cert,
                  svn_boolean_t print_warning,
                  apr_pool_t *result_pool,
                  apr_pool_t *scratch_pool)
{
  svn_x509_certinfo_t *certinfo;
  const svn_string_t *der_cert;
  svn_error_t *err;
  der_cert = svn_base64_decode_string(ascii_cert, scratch_pool);
  err = svn_x509_parse_cert(&certinfo, der_cert->data, der_cert->len,
                            result_pool, scratch_pool);
  if (err)
    {
      if (print_warning)
        svn_handle_warning2(stderr, err, "svn: ");
      svn_error_clear(err);
      return NULL;
    }
  return certinfo;
}
static svn_x509_certinfo_t * parse_certificate ( const svn_string_t * ascii_cert , svn_boolean_t print_warning , apr_pool_t * result_pool , apr_pool_t * scratch_pool ) { svn_x509_certinfo_t * certinfo ; const svn_string_t * der_cert ; svn_error_t * err ; der_cert = svn_base64_decode_string ( ascii_cert , scratch_pool ) ; err = svn_x509_parse_cert ( & certinfo , der_cert -> data , der_cert -> len , result_pool , scratch_pool ) ; if ( err ) { if ( print_warning ) svn_handle_warning2 ( stderr , err , " " ) ; svn_error_clear ( err ) ; return NULL ; } return certinfo ; }
decodes from format we store certs in for auth creds and
 turns parsing errors into warnings if PRINT_WARNING is TRUE
 and ignores them otherwise.
decodes from format we store certs in for auth creds and turns parsing errors into warnings if PRINT_WARNING is TRUE and ignores them otherwise .
/* Convert header-less PEM to DER by undoing base64 encoding. */ /* Just display X.509 parsing errors as warnings and continue */