NetTalk Central

Author Topic: Trouble with CreateCertificateSigningRequest.bat  (Read 5172 times)

Stu

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
    • Email
Trouble with CreateCertificateSigningRequest.bat
« on: September 02, 2013, 05:37:24 PM »
Hi Folks,

Windows 8, Clarion 8, Nettalk 6.last

I'm trying to run the CreateCertificateSigningRequest.bat file (as Administrator), and I get the following feedback:

Code: [Select]
'..\openssl' is not recognized as an internal or external command, operable program or batch file.
Now "openssl.exe" definitely exists in the folder above.

Is this something to do with Windows 8 do you think?

[attachment deleted by admin]
Cheers,

Stu Andrews

Stu

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
    • Email
Re: Trouble with CreateCertificateSigningRequest.bat
« Reply #1 on: September 02, 2013, 05:47:47 PM »
Okay, more on this.

When running the openssl.exe (either with or without Administrator), I get the following error:

Code: [Select]
The ordinal 285 could not be located in the dynamic link library c:\clarion8\accessory\bin\openssl.exe.
Will keep tracking down what is going on.

[attachment deleted by admin]
Cheers,

Stu Andrews

Stu

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
    • Email
Re: Trouble with CreateCertificateSigningRequest.bat
« Reply #2 on: September 02, 2013, 05:49:13 PM »
Wait .. in the dynamic link library ???

Can an exe give back a dll error?
Cheers,

Stu Andrews

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11194
    • View Profile
Re: Trouble with CreateCertificateSigningRequest.bat
« Reply #3 on: September 03, 2013, 07:12:07 AM »
sounds like the openssl exe version may not match the open ssl DLL's.

Stu

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
    • Email
Re: Trouble with CreateCertificateSigningRequest.bat
« Reply #4 on: September 03, 2013, 03:03:27 PM »
Okay, maybe. But I have no idea what to do about that.

I downloaded the latest from here (http://slproweb.com/products/Win32OpenSSL.html), and copied the four files I knew about (the three dlls, and opensll.exe). It now doesn't give the "ordinal 285" error, but running the BAT file does give the same issue as above.

Are the EXE and DLLs specially "Clarion-ised"?
Cheers,

Stu Andrews

Stu

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
    • Email
Re: Trouble with CreateCertificateSigningRequest.bat
« Reply #5 on: September 03, 2013, 03:13:56 PM »
Found this at the bottom of the Nettalk SSL docs:

Quote
Note: The SSL DLL's were updated in NetTalk 7.11, and the MSVCR90.DLL is a new dependency, replacing the dependency on MSVCRT71.DLL. Although the MSVCR90.DLL is shipped with NetTalk, the recommended approach to installing this DLL on your target system is to install the Microsoft Visual C++ Redistributable Package (x86) on the target machine.

So I definitely don't have MSVCR90.DLL in my Nettalk 6 accessory/bin folder. It was in the NT7 folder (but copying that into the current - NT6 - accessory bin folder didn't solve the problem).

Am sure it's my understanding here that's limited.

Is this something wrong with the Nettalk installed DLLs, and/or something I can fix myself?
Cheers,

Stu Andrews

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11194
    • View Profile
Re: Trouble with CreateCertificateSigningRequest.bat
« Reply #6 on: September 03, 2013, 09:18:08 PM »
>> Are the EXE and DLLs specially "Clarion-ised"?
no, not at all

probably you want to run some tests;

in dos mode,
go to \clarion\accessory\bin folder
and run
OpenSSL.Exe
on my machine it offers a prompt
OpenSSL>
(you can press Ctrl-C to terminate it)

If that doesn't run then we need to looker deeper into what is actually in the folder.

cheers
Bruce

Stu

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
    • Email
Re: Trouble with CreateCertificateSigningRequest.bat
« Reply #7 on: September 03, 2013, 09:38:04 PM »
1. The openssl.exe (and dlls) that I downloaded from openssl this morning - I get the prompt.
   - but alas, then, when I try to go ahead with this, I get the same error (which is the one I noticed before noticing the problem with openssl.exe).

2. The ones that shipped with nettalk 6 (and tried with nt7, same thing) - I get the error.
Cheers,

Stu Andrews

Stu

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
    • Email
Re: Trouble with CreateCertificateSigningRequest.bat
« Reply #8 on: September 04, 2013, 05:58:57 PM »
Just went back to an old Clarion 6 folder (last used in ~2010), on a different machine.

Got the same, or similar, error (file attached).

Now, last year (2012) this all worked okay. On my dev machine.

So. If a different clarion on a different machine with an old nettalk give the same issue, what does that say.

* Maybe that it was broken back then, it was working in 2012, and now it's broken again. This seems implausible.

* It could be that a windows dll being used by openssl.exe (unlikely????) has changed in a windows update.

-- AHA! --

When I run the "openssl.exe" in the clarion 6 folder, it works fine. Cmd prompt appears with "OpenSSL>".

But then gives the
Code: [Select]
the ordinal 286 could not be located ssleay32.dll error.

[attachment deleted by admin]
« Last Edit: September 04, 2013, 06:16:24 PM by Stu »
Cheers,

Stu Andrews

Stu

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
    • Email
Re: Trouble with CreateCertificateSigningRequest.bat
« Reply #9 on: September 04, 2013, 06:19:22 PM »
* Back on the dev machine, Clarion 8, Nettalk 6.51.

Not sure if this is anything, but Dependency Walker says that there's a problem with DBGHELP.DLL (see attached image).

[attachment deleted by admin]
Cheers,

Stu Andrews

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11194
    • View Profile
Re: Trouble with CreateCertificateSigningRequest.bat
« Reply #10 on: September 04, 2013, 09:50:44 PM »
sounds like it's unhappy with the version of ssleay32.dll
maybe kill your path during the test so no DLL's elsewhere interfere.


cheers
Bruce

Stu

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
    • Email
Re: Trouble with CreateCertificateSigningRequest.bat
« Reply #11 on: September 05, 2013, 01:04:48 AM »
Am assuming that to "kill" my PATH I just clear out the Path value in Environment Variables in Advanced system settings.

Will try it (although I need to put something in there, will go with c:).

** Didn't solve the issue. Same problem. Gah.
Cheers,

Stu Andrews

Stu

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
    • Email
Re: Trouble with CreateCertificateSigningRequest.bat
« Reply #12 on: September 05, 2013, 01:22:47 AM »
Okay. Progress, sort of.

1. Googled around some more, found this StackOverflow post .. http://stackoverflow.com/questions/6178815/wamp2-https-and-ssl. Clicked on the link and Downloaded the OpenSSL it recommended.

2. Copy and pasted the exe + 2 dlls from there into accessory/bin .. ran the exe. Came up with OpenSSL> .. Huzzah!

3. Ran (admin) the CreateCertificateSigningRequest.bat file.

4. Got the same error as above, "..\openssl is not recognized as an internal or external command, operable program or batch file.".

5. Copy and pasted the exe + 2 dlls into the "Make Certificates" folder.

6. Edited the bat file to remove the "..\" in front of the two openssl commands.

7. Ran (admin) the CreateCertificateSigningRequest.bat file.

8. Okay, crazy. See the attached image.

Code: [Select]
.\YourCARoot\private\ForReal.key: No error
1748:error:02001003:system library:fopen:No such process:.\crypto\bio\bss_file.c:356:fopen('.\YourCARoot\private\ForReal.key','wb')
1748:error:20074002:BIO routines:FILE_CTRL:system lib:.\crypto\bio\bss_file.c:258:

And there's another one for the second openssl call.

** I'm guessing this is because the batch file is calling stuff that doesn't make sense to the version of openssl downloaded.

So I'm going to try (again) the files from the openssl site. See if I can get that working.

[EDIT]

* Downloaded the latest OpenSSL binaries. On following the same logic as above, got the same errors.

Image of the errors now attached.

[attachment deleted by admin]
« Last Edit: September 05, 2013, 01:28:06 AM by Stu »
Cheers,

Stu Andrews

Stu

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
    • Email
Re: Trouble with CreateCertificateSigningRequest.bat
« Reply #13 on: September 05, 2013, 02:23:12 AM »
SKIP TO HERE

Okay, I think most of the above post is a red herring.

I've come back around to this question:


Why, when I run the CreateCertificateSigningRequest.bat file do I get the error:
Code: [Select]
'..\openssl' is not recognized as an internal or external command, operable program or batch file.[/size]

* I've tried clearing out the PATH variable except for c:\clarion8\accessory\bin.
* Have tried downloading the latest openssl binaries.
* Have been sent (thanks Bill!) and exe + dlls that are verified to have worked.

But I think it comes back to why the above batch file cannot run the opensll.exe in the parent directory.
Cheers,

Stu Andrews

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: Trouble with CreateCertificateSigningRequest.bat
« Reply #14 on: September 06, 2013, 12:51:08 AM »
Message from Stu:

"Stu got this fixed by not being an idiot and running the bat file through an elevated command prompt"?