Well, did you change all the functions as i wrote above?
I remember icu had fun replacing : with /, which is why i had to disable that silly code.
Quote:
And finally, in udata.cpp, around line 1137, you might want to disable that code: if (U_FILE_SEP_CHAR != U_FILE_ALT_SEP_CHAR) /* Windows: try "foo\bar" and "foo/bar" */ { /* remap from alternate path char to the main one */ CharString altSepPath; ... }
/*
#if (U_FILE_SEP_CHAR != U_FILE_ALT_SEP_CHAR) // Windows: try "foo\bar" and "foo/bar"
// remap from alternate path char to the main one
CharString altSepPath;
if(path) {
if(uprv_strchr(path,U_FILE_ALT_SEP_CHAR) != NULL) {
altSepPath.append(path, *pErrorCode);
char *p;
while((p=uprv_strchr(altSepPath.data(), U_FILE_ALT_SEP_CHAR))) {
*p = U_FILE_SEP_CHAR;
}
#if defined (UDATA_DEBUG)
fprintf(stderr, "Changed path from [%s] to [%s]\n", path, altSepPath.s);
#endif
path = altSepPath.data();
}
}
#endif
*/
CharString tocEntryName; /* entry name in tree format. ex: 'icudt28b/coll/ar.res' */
CharString tocEntryPath; /* entry name in path format. ex: 'icudt28b\\coll\\ar.res' */
....
Maybe something else should be commented ? I can of course go usual brutal way, just return what i need to return at end of whole doOpenChoice() function (like those pkgName.data(), dataPath , etc), but that can make side-effect somewhere, and i do no want introduce new bugs by my crapo-hacks
Edited by kas1e on 2014/2/5 12:25:33 Edited by kas1e on 2014/2/5 12:26:26 Edited by kas1e on 2014/2/5 12:27:23
Thanks for the detailed info on cross-compiling libICU.
As for your porting progress, I'm sure the path issue is something you can track down without resorting to any nasty workarounds. It's gotta be modifying the path somewhere!
Then it works, PROGDIR:Resource everywhere, and odyssey didn't crashes !
What is strange, is that path = u_getDataDirectory();, return PROGDIR/Resource, and not PROGDIR:Resource. I.e. if at begining of UDataPathIterator::UDataPathIterator i add:
Then it return PROGDIR/Resource, just like u_getDataDirectory return wrong path already. But then, if at end of u_getDataDirectory, i add:
Quote:
u_setDataDirectory(path); KPrintF("path at end of u_getDataDirectory = %s\n", path); return gDataDirectory;
Then it print normal path (i.e. PROGDIR:Resource), but when UDataPathIterator::UDataPathIterator call it at begining path aready PROGDIR/Resource. What mean that "return gDataDirectory" from u_getDataDirecotry return bad path.
@Fab Are you tried to update to latest curl already ? I have some problem with certificates when i build 7.34.0 for odyssey 1.23. Problem is: with Security/Ignore SSL errors everything works, i can go on https fine. But if i untick that option, i have on every https site:
Quote:
Unable to open 'http://sitename". Error 60: Peer certificate cannot be authenticated with give CA certificates.
But, i have of course your latest curl-ca-bundle.crt (and in Settings/Secutiry certificate path are have "PROGDIR:curl-ca-bundle.crt" as well.
I even tried with my own: i.e. in the curl 7.34.0 directory i run "make ca-bundle" and copy new lib/ca-bundle.crt to the odyssey directory instead of your old one : still the same error.
Have any ideas what can be wrong ? By default even with curl binary it is:
curl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you can specify an alternate file using the --cacert option. If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL). If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option.
7/60.RAM Disk:>
And i need to add --cacert option to it to make it works:
curl: (60) SSL certificate problem, verify that the CA cer is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed. More details here: htt://curl.haxx.se/docs/sslcerts.html
curl version: 7.35.0 Host setup: powerpc-unknown-amigaos Install prefix: /usr/local Compiler: ppc-amigaos-gcc SSL support: enabled (OpenSSL) SSH support: no (--with-libssh2) zlib support: enabled GSSAPI support: no (--with-gssapi) SPNEGO support: no (--with-spnego) TLS-SRP support: no (--enable-tls-srp) resolver: POSIX threaded ipv6 support: no (--enable-ipv6) IDN support: no (--with-{libidn,winidn}) Build libcurl: Shared=no, Static=yes Built-in manual: no (--enable-manual) --libcurl option: enabled (--disable-libcurl-option) Verbose errors: enabled (--disable-verbose) SSPI support: no (--enable-sspi) ca cert bundle: no ca cert path: no LDAP support: no (--enable-ldap / --with-ldap-lib / --with-lber-lib) LDAPS support: no (--enable-ldaps) RTSP support: enabled RTMP support: enabled (librtmp) metalink support: no (--with-libmetalink) HTTP2 support: disabled (--with-nghttp2) Protocols: DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS POP3 POP3S RTMP RTSP SMTP SMTPS TELNET TFTP
SONAME bump: yes - WARNING: this library will be built with the SONAME number bumped due to (a detected) ABI breakage. See lib/README.curl_off_t for details on this.
I.e. i have "ca cert bunde: no". I can of course specifcy --with-ca-bundle=curl-ca_bundle.crt , but then, i was in hope that if we have it in security/path its enough ?
You have to specify the bundle location, it won't default to "PROGDIR:curl-ca-bundle.crt" magically. IIRC, it should be CURL_CA_BUNDLE define in config.h
I don't know about the configure options, i made my own makefile/config.h for curl, i don't need their configure crap.
@Fab For now just build curl with --with-ca-bundle=ca_bundle.crt, and it takes from progdir fine and all works.
Yep, i can just now redefine CURL_CA_BANDLE to something like "PROGDIR:curl-ca-bundle.crt", but then i can't get why you need to have that settings/preferences/security/certificated_path, if, it will be anyway taken only from PROGDIR:curl-ca-bunlde.crt, as it hardcore in curl, and does not matter what to write here, it still will search for PROGDIR:curl-ca-bundle.crt.
I mean, if it there just to show where file placed, then imho it should't be selectable, as it seems will make no differences ?
The crt path option of course works too in Odyssey. It may be another issue in your curl build. But first we had to rule out other potential issues by setting default path properly.
But first we had to rule out other potential issues by setting default path properly.
Ok, done with PROGDIR:curl-ca-bundle.crt by editing related config.h and CURL_CA_BUNDLE define, and it works. But, if i rename that file to something like omega1200.crt , and choice it from odyssey's settings in secirity path (so its PROGDIR:omiga1200.crt), then save / quit /run odyssey, then that file didn't taken in account and when i go to any https page i have:
Quote:
Unable to open "https://sitename" Error 77: Problem with SSL CA cert (path? access rights?)
@Fab Good (or bad) news: in morphos's 1.23 version its the same didn't works. I.e. i rename file to omega1200.crt, choice that file in security path, save, quit, run, go to https page , and it give me same error as on os4. Once i rename file back to curl-ca-bundle.crt, but still in security path have omega1200.crt, then it all start to works.
That what i mean before: path + file inbuild in curl library, so seems does not matter what we set on os4 port, or on morphos version in that path, it just didn't taken in account on all versions anymore.