diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2008-12-21 02:08:24 +0100 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2008-12-21 02:08:24 +0100 |
commit | 33c16185e500e18dbf364dc183a2ce713448931f (patch) | |
tree | e65a458004cd20cf27ae0ac3b7f5572041e17db6 /eurephiadm | |
parent | 82e9f56cc06ae751a2f34b250d07089b08c147f4 (diff) | |
download | eurephia-33c16185e500e18dbf364dc183a2ce713448931f.tar.gz eurephia-33c16185e500e18dbf364dc183a2ce713448931f.tar.xz eurephia-33c16185e500e18dbf364dc183a2ce713448931f.zip |
Moved all replace_char(...) calls into SQLite3 driver as xmlReplaceChars(...)
Diffstat (limited to 'eurephiadm')
-rw-r--r-- | eurephiadm/commands/certificates.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/eurephiadm/commands/certificates.c b/eurephiadm/commands/certificates.c index 4c96a8c..e91dfb4 100644 --- a/eurephiadm/commands/certificates.c +++ b/eurephiadm/commands/certificates.c @@ -215,19 +215,6 @@ void xmlPrint_certs(xmlXPathContext *certsXP, const char *xpath, int show_flags) } -void replace_char(char *str, char s, char r) { - if( str != NULL ) { - char *ptr = str; - - while( *ptr != '\0' ) { - if( *ptr == s ) { - *ptr = r; - } - ptr++; - } - } -} - int register_certificate(eurephiaCTX *ctx, int depth, const char *digest, const char *cname, const char *org, const char *email) { @@ -248,9 +235,7 @@ int register_certificate(eurephiaCTX *ctx, int depth, const char *digest, snprintf(tmp, 64, "%i", depth); cname_cp = strdup_nullsafe(cname); - replace_char(cname_cp, ' ', '_'); org_cp = strdup_nullsafe(org); - replace_char(org_cp, ' ', '_'); xmlNewChild(cert_n, NULL, (xmlChar *) "depth", (xmlChar *) tmp); xmlNewChild(cert_n, NULL, (xmlChar *) "digest", (xmlChar *) digest); @@ -524,11 +509,9 @@ int delete_cert(eurephiaCTX *ctx, eurephiaSESSION *sess, eurephiaVALUES *cfg, in break; case 'C': // Certificate - common_name / CN cname = strdup_nullsafe(optargs[0]); - replace_char(cname, ' ', '_'); break; case 'O': // Certificate - organisation / O org = strdup_nullsafe(optargs[0]); - replace_char(org, ' ', '_'); break; case 'E': // Certificate - e-mail / emailAddr email = optargs[0]; |