Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Chilkat

Pages: 1 ... 3 4 [5] 6 7
public class XMPMetaData {
I have a Java web application using Liferay, and the following code results in the error: 
Code: [Select]
Native code library failed to load.
java.lang.UnsatisfiedLinkError: Native Library /home/liferay/chilkatjava-9.5.0-jdk7-x86_64-linux/ already loaded in another classloader

This is the code to load the library:
Code: [Select]
static {
try {
    } catch (UnsatisfiedLinkError e) {
      System.err.println("Native code library failed to load.\n" + e);

TLS / TCP Sockets / Re: What is TLS? How can I force TLS 1.1?
« on: December 08, 2017, 02:45:34 PM »
First, Chilkat does not depend on the operating system for TLS settings, so whatever exists in the Windows registry has no bearing when using Chilkat.

The client-side of a TLS connection cannot force a particular version.  The TLS protocol is designed in this way:  The client (Chilkat) tells the server the highest version of TLS it will accept.  The server then chooses the version to be used and tells the client.  For example, Chilkat might say "I can handle TLS versions up to 1.2".  The server might say, OK, let's use "1.2".  And so 1.2 is used.

Chilkat has a property named SslProtocol  that allows you to define what Chilkat will accept.  I recommend leaving it at the default setting.  For example, if you set SslProtocol = "TLS 1.0 or higher", then Chilkat will reject the connection if the server chooses anything below TLS 1.0 (such as SSL 3.0).

TLS / TCP Sockets / Re: What is TLS? How can I force TLS 1.1?
« on: December 08, 2017, 02:40:24 PM »
 Do you know of a way to force each workstation to use 1.1 or 1.2?  Is there a registry setting to disable SSL entirely?

TLS / TCP Sockets / Re: What is TLS? How can I force TLS 1.1?
« on: December 08, 2017, 02:39:56 PM »
TLS is "SSL".  It's the communications protocol used when you see "https://".   The versioning goes like this:  SSL 2.0, SSL 3.0, TLS 1.0, TLS 1.1, ...
You don't have to do anything different.  Chilkat will automatically use what the server desires.

TLS / TCP Sockets / What is TLS? How can I force TLS 1.1?
« on: December 08, 2017, 02:39:30 PM »
What is TLS and how is it used?  Iíve googled it but not quite sure what is means.  If you can give me a brief sentence or two I would appreciate it.

TLS / TCP Sockets / Re: HTTPS Server
« on: December 08, 2017, 02:38:38 PM »
The most straightforward way of implementing such a thing would be to use separate threads.  (Look to your particular programming language for information about multi-threaded programming.)  Assuming you know how to create a thread in your programming language, have one thread be the "accept connection" thread.  It just sits and waits for an incoming connection by calling AcceptNextConnection.  When a connection is received, AcceptNextConnection returns the connected socket object, and you can start a new thread to specifically handle that connection.  You would pass the connected socket object to the new thread, which now owns it.  Meanwhile, your "accept connection" thread, just loops to call AcceptNextConnection again to receive the next incoming connection, etc..

For many methods that accept a string input, such as for hashing, encryption, compression, etc., it's
imperative to specify the exact bytes that are hashed/encrypted/compressed/...

When a string is passed, a string is a sequence of characters (i.e. symbols).  For example 'A'.
In us-ascii, 'A' is the byte value 0x41.    In utf-16 it's two bytes 0x0041. 

The charset specifies the byte representation of the string.  See
In other words, you cannot hash/compress/encrypt a "string", you can only do so with a particular byte
representation of the string.

In this case, the default byte representation is ANSI (which is windows-1252,  i.e. the single-byte per char Western European charset)
This has always been the default.   If, for example, you pass a Korean char in the string, then the conversion
to the windows-1252 byte representation will fail because, since it's a 1-byte per char representation, it's only capable
of defining code points for us-ascii and Western European language chars.  You would need a Charset such as utf-8, utf-16, or
something else..

Chilkat fails the method call if it encounters chars not represented by the Charset.

I get the following in the LastErrorText for a call to CompressString:
Code: [Select]
    DllDate: Nov 27 2017
    UnlockPrefix: xxx
    Architecture: Little Endian; 64-bit
    Language: .NET 4.6 VS2017 / x64
    VerboseLogging: 0
    Character encoding conversion failed.
    Charset: windows-1252
    ConvertedToNumBytes: 4573
    Set the Charset property equal to an appropriate charset (see

.NET / Re: (Chilkat.PrivateKey) -> GetRsaPem() vs SaveRsaPemFile(xx)
« on: December 02, 2017, 01:24:27 PM »
GetRsaPem returns the RSA key using PKCS1, whereas SaveRsaPemFile uses PKCS8.  Both are correct, just slightly different internal formats.

Both GetRsaPem and SaveRsaPemFile are deprecated. 

The GetRsaPem method is replaced by the GetPkcs1Pem and GetPkcs8Pem methods (given that PrivateKey may contain a non-RSA key).
Likewise, the SaveRsaPem file should be replaced by either SavePkcs1File or SavePkcs8File.

PHP / Re: PHP Errors after apt-get install
« on: December 02, 2017, 10:30:28 AM »
This problem is caused because the "chilkat_9_5_0.php" file was installed to a PHP version specific directory.  For example, in the case above, it was installed to /usr/share/php/20160303

The error message (above) shows the include path where PHP was looking:  (include_path='.:/usr/share/php')

The solution is to copy the chilkat_9_5_0.php from where it was installed to /usr/share/php.   To find out where Chilkat installed the chilkat_9_5_0.php, run the following PHP script:
Code: [Select]


$extPath "\n";



PHP / PHP Errors after apt-get install
« on: December 02, 2017, 10:23:35 AM »
Installing the Chilkat PHP extension via apt-get seemed to work fine.  However, when I try to use Chilkat in a PHP script, I get the following error:
Code: [Select]
PHP Warning:  include(chilkat_9_5_0.php): failed to open stream: No such file or directory in /home/chilkat/temp/chilkat-9.5.0-php-7.1-x86_64-linux/x/test.php on line 3
PHP Warning:  include(): Failed opening 'chilkat_9_5_0.php' for inclusion (include_path='.:/usr/share/php') in /home/chilkat/temp/chilkat-9.5.0-php-7.1-x86_64-linux/x/test.php on line 3
PHP Fatal error:  Uncaught Error: Class 'CkCrypt2' not found in /home/chilkat/temp/chilkat-9.5.0-php-7.1-x86_64-linux/x/test.php:5
Stack trace:
#0 {main}
  thrown in /home/chilkat/temp/chilkat-9.5.0-php-7.1-x86_64-linux/x/test.php on line 5

PHP / Re: PHP 7.2.0 Released Chilkat is compatible?
« on: December 02, 2017, 10:20:49 AM »
Builds for PHP 7.2.0 are now available..

The Chilkat.Http (or CkHttp) class caches open connections.   For example, if your app calls Http.QuickGetStr(""), Chilkat will by-default add a "Connection: keep-alive" header.  (You can remove this header by setting the Http.Connection property equal to the empty string.)  If the server's response includes a "Connection: close" header, then Chilkat knows the server will be closing the connection after the response is sent.  Thus the open connection won't be cached.   

A cached connection is good for performance.  If, for example, you are sending 10 GET requests in a row, then all can occur on the same connection.

Here's what's happening in your case.  Imagine you send a request and the open connection is cached because the server did not include a "Connection: close" in the response header.  Then your app doesn't send another request for quite some time, but meanwhile the server closes its connection due to inactivity.  We now have a half-closed connection, that is not yet discovered by Chilkat, because Chilkat hasn't yet tried to do anything (read/write) on the connection.   Your app then sends the next request, the cached connection is found, and we try to write to it -- but that's when it's discovered that the connection was previously closed by the server.  No problem, we'll just open a new connection and send the request. 

If you don't want the connection cached, you can set the Http.Connection property = "".    Also, you can call Http.CloseAllConnections to forcibly close any open/cached connections prior to the next HTTP request.

REST / HTTP / HTTPS / HTTP Internal Retry after Lost Connection Discovered
« on: November 29, 2017, 09:05:43 AM »
We are having issues where the remote host is forcibly closing our connection and ChilkatHttpRequest is then retrying (retryAfterLostConnectionDiscovered2).

We need to be able to stop this retry happening, or for a predefined period (we need to exceed 4 seconds before a retry), as the remote system cannot cope (itís not a Firewall issue, the host has a poorly designed processor).

Please let me know how this can be implemented.

REST / HTTP / HTTPS / Re: Sending a message takes adjacent parameters
« on: November 29, 2017, 08:57:44 AM »
Use a new instance of the HttpRequest object for the 2nd call to PostUrlEncoded.

Alternatively, remove the "name" query parameter you previously added by calling req.RemoveParam("name").

Note: The request object contains whatever you added to it (such as query parameters, additional request headers, etc.)
The contents of a request object instance aren't going to magically change just because the object is passed to one Http method call and then another..

Pages: 1 ... 3 4 [5] 6 7