summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-01-18 00:43:21 +0100
committerFlorian Dold <florian.dold@gmail.com>2020-01-18 00:43:29 +0100
commitc805e9cf20d39b17336a05c0879aac028de7488b (patch)
tree7ed76916ec4c5eb9e2240502c587703f39804513 /src
parent04b5e7e3e898bf9a632cee8e6486ba454e8e0252 (diff)
downloadexchange-c805e9cf20d39b17336a05c0879aac028de7488b.tar.gz
exchange-c805e9cf20d39b17336a05c0879aac028de7488b.tar.bz2
exchange-c805e9cf20d39b17336a05c0879aac028de7488b.zip
DCE: we never have to derrive the wire_gateway_url from the payto URI
Diffstat (limited to 'src')
-rw-r--r--src/include/taler_util.h11
-rw-r--r--src/util/test_payto.c8
-rw-r--r--src/util/util.c43
3 files changed, 0 insertions, 62 deletions
diff --git a/src/include/taler_util.h b/src/include/taler_util.h
index 2cc0e4940..37b6765a2 100644
--- a/src/include/taler_util.h
+++ b/src/include/taler_util.h
@@ -281,17 +281,6 @@ TALER_xtalerbank_base_url_from_payto (const char *payto);
/**
- * Given an x-taler-bank payto:// URL, compute
- * the HTTP(S) base URL of the account.
- *
- * @param payto the payto URL
- * @return bank URL of the account, NULL if not x-taler-bak payto URL
- */
-char *
-TALER_xtalerbank_account_url_from_payto (const char *payto);
-
-
-/**
* Obtain the account name from a payto URL.
*
* @param payto an x-taler-bank payto URL
diff --git a/src/util/test_payto.c b/src/util/test_payto.c
index 28caac1ad..5807be20b 100644
--- a/src/util/test_payto.c
+++ b/src/util/test_payto.c
@@ -77,14 +77,6 @@ main (int argc,
"payto://x-taler-bank/localhost:1080/bob");
CHECK ("http://localhost:1080/",
r);
- r = TALER_xtalerbank_account_url_from_payto (
- "payto://x-taler-bank/localhost/bob");
- CHECK ("https://localhost/bob",
- r);
- r = TALER_xtalerbank_account_url_from_payto (
- "payto://x-taler-bank/localhost:1080/alice");
- CHECK ("http://localhost:1080/alice",
- r);
r = TALER_xtalerbank_account_from_payto (
"payto://x-taler-bank/localhost:1080/alice");
CHECK ("alice",
diff --git a/src/util/util.c b/src/util/util.c
index f2ec95a98..36c6f440c 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -720,49 +720,6 @@ TALER_xtalerbank_base_url_from_payto (const char *payto)
/**
- * Given an x-taler-bank payto:// URL, compute
- * the HTTP(S) base URL of the account.
- *
- * @param payto the payto URL
- * @return bank URL of the account, NULL if not x-taler-bak payto URL
- */
-char *
-TALER_xtalerbank_account_url_from_payto (const char *payto)
-{
- const char *start;
- const char *end;
- char *ret;
- int https;
- const char *colon;
- unsigned int port;
-
- if (0 != strncasecmp (payto,
- "payto://x-taler-bank/",
- strlen ("payto://x-taler-bank/")))
- return NULL;
- start = &payto[strlen ("payto://x-taler-bank/")];
- end = strchr (start,
- '/');
- if (NULL == end)
- end = &start[strlen (start)];
- colon = strrchr (start,
- ':');
- https = GNUNET_YES;
- if ( (NULL != colon) &&
- (1 == sscanf (colon + 1,
- "%u",
- &port)) &&
- (443 != port) )
- https = GNUNET_NO;
- GNUNET_asprintf (&ret,
- "%s://%s",
- (https ? "https" : "http"),
- start);
- return ret;
-}
-
-
-/**
* Obtain the account name from a payto URL.
*
* @param payto an x-taler-bank payto URL