public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin Dirmngr and TBB for windows
@ 2018-07-11  8:11 john doe
  2018-08-30 14:51 ` john doe
  0 siblings, 1 reply; 7+ messages in thread
From: john doe @ 2018-07-11  8:11 UTC (permalink / raw)
  To: cygwin

Hi,

I'm trying to get Cygwin dirmngr to work with  Tor Browser for Windows.

Following some discussion on the gnupg user list it looks like that the 
connect(2) function in Cygwin does not return the proper error code:

https://lists.gnupg.org/pipermail/gnupg-users/2018-July/060768.html

On the above link one of the dev suggest that connect(2) returns EPERMS 
instead of ECONREFUSED.

If ECONREFUSED is not returned when port 9050 is queried the fallback 
code in dirmngr will not be executed and port 9150 will never be used.

Using dirmngr on Debian with TBBfor linux works as expected.

Can anyone confirm that and subcequently make Cygwin return the proper 
error code?

Any help is appriciated.

-- 
John Doe

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cygwin Dirmngr and TBB for windows
  2018-07-11  8:11 Cygwin Dirmngr and TBB for windows john doe
@ 2018-08-30 14:51 ` john doe
  2018-08-30 15:07   ` Marco Atzeri
  0 siblings, 1 reply; 7+ messages in thread
From: john doe @ 2018-08-30 14:51 UTC (permalink / raw)
  To: cygwin

On 7/11/2018 10:11 AM, john doe wrote:
> Hi,
> 
> I'm trying to get Cygwin dirmngr to work with  Tor Browser for Windows.
> 
> Following some discussion on the gnupg user list it looks like that the 
> connect(2) function in Cygwin does not return the proper error code:
> 
> https://lists.gnupg.org/pipermail/gnupg-users/2018-July/060768.html
> 
> On the above link one of the dev suggest that connect(2) returns EPERMS 
> instead of ECONREFUSED.
> 
> If ECONREFUSED is not returned when port 9050 is queried the fallback 
> code in dirmngr will not be executed and port 9150 will never be used.
> 
> Using dirmngr on Debian with TBBfor linux works as expected.
> 
> Can anyone confirm that and subcequently make Cygwin return the proper 
> error code?
> 
> Any help is appriciated.
> 

As any one has been able to confirm that the issue is present in Cygwin 
code?
I didn't see anything regarding this issue in the beta version of Cygwin 
or did I mist it?

-- 
John Doe

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cygwin Dirmngr and TBB for windows
  2018-08-30 14:51 ` john doe
@ 2018-08-30 15:07   ` Marco Atzeri
  2018-08-30 23:41     ` Corinna Vinschen
  0 siblings, 1 reply; 7+ messages in thread
From: Marco Atzeri @ 2018-08-30 15:07 UTC (permalink / raw)
  To: cygwin

Am 30.08.2018 um 11:30 schrieb john doe:
> On 7/11/2018 10:11 AM, john doe wrote:
>> Hi,
>>
>> I'm trying to get Cygwin dirmngr to work with  Tor Browser for Windows.
>>
>> Following some discussion on the gnupg user list it looks like that 
>> the connect(2) function in Cygwin does not return the proper error code:
>>
>> https://lists.gnupg.org/pipermail/gnupg-users/2018-July/060768.html
>>
>> On the above link one of the dev suggest that connect(2) returns 
>> EPERMS instead of ECONREFUSED.
>>
>> If ECONREFUSED is not returned when port 9050 is queried the fallback 
>> code in dirmngr will not be executed and port 9150 will never be used.
>>
>> Using dirmngr on Debian with TBBfor linux works as expected.
>>
>> Can anyone confirm that and subcequently make Cygwin return the proper 
>> error code?
>>
>> Any help is appriciated.
>>
> 
> As any one has been able to confirm that the issue is present in Cygwin 
> code?
> I didn't see anything regarding this issue in the beta version of Cygwin 
> or did I mist it?


a Simple Test Case will help to verify the claim.

connect is not expected to return EPERM
http://pubs.opengroup.org/onlinepubs/9699919799/functions/connect.html




---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cygwin Dirmngr and TBB for windows
  2018-08-30 15:07   ` Marco Atzeri
@ 2018-08-30 23:41     ` Corinna Vinschen
  2018-08-31  4:37       ` john doe
  0 siblings, 1 reply; 7+ messages in thread
From: Corinna Vinschen @ 2018-08-30 23:41 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1891 bytes --]

On Aug 30 14:35, Marco Atzeri wrote:
> Am 30.08.2018 um 11:30 schrieb john doe:
> > On 7/11/2018 10:11 AM, john doe wrote:
> > > Hi,
> > > 
> > > I'm trying to get Cygwin dirmngr to work with  Tor Browser for Windows.
> > > 
> > > Following some discussion on the gnupg user list it looks like that
> > > the connect(2) function in Cygwin does not return the proper error
> > > code:
> > > 
> > > https://lists.gnupg.org/pipermail/gnupg-users/2018-July/060768.html
> > > 
> > > On the above link one of the dev suggest that connect(2) returns
> > > EPERMS instead of ECONREFUSED.
> > > 
> > > If ECONREFUSED is not returned when port 9050 is queried the
> > > fallback code in dirmngr will not be executed and port 9150 will
> > > never be used.
> > > 
> > > Using dirmngr on Debian with TBBfor linux works as expected.
> > > 
> > > Can anyone confirm that and subcequently make Cygwin return the
> > > proper error code?
> > > 
> > > Any help is appriciated.
> > > 
> > 
> > As any one has been able to confirm that the issue is present in Cygwin
> > code?
> > I didn't see anything regarding this issue in the beta version of Cygwin
> > or did I mist it?
> 
> 
> a Simple Test Case will help to verify the claim.

Full ACK.

> connect is not expected to return EPERM
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/connect.html

Cygwin does not explicitely generate EPERM anywhere near
AF_INET/AF_INET6 code.  Nor does a Winsock error exist which
gets gonverted to EPERM.

The *only* way to generate EPERM is if an underlying Winsock function 
returns an error code not handled by Cygwin.  I never encountered
that case, though.  Thus, a STC is highly appreciated.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cygwin Dirmngr and TBB for windows
  2018-08-30 23:41     ` Corinna Vinschen
@ 2018-08-31  4:37       ` john doe
  2018-08-31 16:47         ` Corinna Vinschen
  0 siblings, 1 reply; 7+ messages in thread
From: john doe @ 2018-08-31  4:37 UTC (permalink / raw)
  To: cygwin

On 8/30/2018 5:07 PM, Corinna Vinschen wrote:
> On Aug 30 14:35, Marco Atzeri wrote:
>> Am 30.08.2018 um 11:30 schrieb john doe:
>>> On 7/11/2018 10:11 AM, john doe wrote:
>>>> Hi,
>>>>
>>>> I'm trying to get Cygwin dirmngr to work with  Tor Browser for Windows.
>>>>
>>>> Following some discussion on the gnupg user list it looks like that
>>>> the connect(2) function in Cygwin does not return the proper error
>>>> code:
>>>>
>>>> https://lists.gnupg.org/pipermail/gnupg-users/2018-July/060768.html
>>>>
>>>> On the above link one of the dev suggest that connect(2) returns
>>>> EPERMS instead of ECONREFUSED.
>>>>
>>>> If ECONREFUSED is not returned when port 9050 is queried the
>>>> fallback code in dirmngr will not be executed and port 9150 will
>>>> never be used.
>>>>
>>>> Using dirmngr on Debian with TBBfor linux works as expected.
>>>>
>>>> Can anyone confirm that and subcequently make Cygwin return the
>>>> proper error code?
>>>>
>>>> Any help is appriciated.
>>>>
>>>
>>> As any one has been able to confirm that the issue is present in Cygwin
>>> code?
>>> I didn't see anything regarding this issue in the beta version of Cygwin
>>> or did I mist it?
>>
>>
>> a Simple Test Case will help to verify the claim.
> 
> Full ACK.
> 
>> connect is not expected to return EPERM
>> http://pubs.opengroup.org/onlinepubs/9699919799/functions/connect.html
> 
> Cygwin does not explicitely generate EPERM anywhere near
> AF_INET/AF_INET6 code.  Nor does a Winsock error exist which
> gets gonverted to EPERM.
> 
> The *only* way to generate EPERM is if an underlying Winsock function
> returns an error code not handled by Cygwin.  I never encountered
> that case, though.  Thus, a STC is highly appreciated.
> 
> 
> Corinna
> 

Thanks both for your answer and your willingness to look into this.

STC:
1)  Have Tor Browser for Windows up and running.
2)  Start dirmngr:
   $ mkdir ${HOME}/try
   $ dirmngr --homedir ${HOME}/try -vvv --debug-all --server --use-tor
   -> KS_GET -- 0x6C6ACD6417B3ACB1

Basically, dirmngr should be able to connect to TBB for Windows like it 
does on linux and retreave the key.

Let me know if more informations are needed.
I  came to this list  because the issue seems to come from Cygwin, 
according  to the discussion at the first URL in this e-mail.

-- 
John Doe

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cygwin Dirmngr and TBB for windows
  2018-08-31  4:37       ` john doe
@ 2018-08-31 16:47         ` Corinna Vinschen
  2018-08-31 20:37           ` Brian Inglis
  0 siblings, 1 reply; 7+ messages in thread
From: Corinna Vinschen @ 2018-08-31 16:47 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 2679 bytes --]

On Aug 30 21:20, john doe wrote:
> On 8/30/2018 5:07 PM, Corinna Vinschen wrote:
> > On Aug 30 14:35, Marco Atzeri wrote:
> > > Am 30.08.2018 um 11:30 schrieb john doe:
> > > > On 7/11/2018 10:11 AM, john doe wrote:
> > > > > Hi,
> > > > > 
> > > > > I'm trying to get Cygwin dirmngr to work with  Tor Browser for Windows.
> > > > > 
> > > > > Following some discussion on the gnupg user list it looks like that
> > > > > the connect(2) function in Cygwin does not return the proper error
> > > > > code:
> > > > > 
> > > > > https://lists.gnupg.org/pipermail/gnupg-users/2018-July/060768.html
> > > > > 
> > > > > On the above link one of the dev suggest that connect(2) returns
> > > > > EPERMS instead of ECONREFUSED.
> > > > > 
> > > > > If ECONREFUSED is not returned when port 9050 is queried the
> > > > > fallback code in dirmngr will not be executed and port 9150 will
> > > > > never be used.
> > > > > 
> > > > > Using dirmngr on Debian with TBBfor linux works as expected.
> > > > > 
> > > > > Can anyone confirm that and subcequently make Cygwin return the
> > > > > proper error code?
> > > > > 
> > > > > Any help is appriciated.
> > > > > 
> > > > 
> > > > As any one has been able to confirm that the issue is present in Cygwin
> > > > code?
> > > > I didn't see anything regarding this issue in the beta version of Cygwin
> > > > or did I mist it?
> > > 
> > > 
> > > a Simple Test Case will help to verify the claim.
> > 
> > Full ACK.
> > 
> > > connect is not expected to return EPERM
> > > http://pubs.opengroup.org/onlinepubs/9699919799/functions/connect.html
> > 
> > Cygwin does not explicitely generate EPERM anywhere near
> > AF_INET/AF_INET6 code.  Nor does a Winsock error exist which
> > gets gonverted to EPERM.
> > 
> > The *only* way to generate EPERM is if an underlying Winsock function
> > returns an error code not handled by Cygwin.  I never encountered
> > that case, though.  Thus, a STC is highly appreciated.
> > 
> > 
> > Corinna
> > 
> 
> Thanks both for your answer and your willingness to look into this.
> 
> STC:
> 1)  Have Tor Browser for Windows up and running.
> 2)  Start dirmngr:
>   $ mkdir ${HOME}/try
>   $ dirmngr --homedir ${HOME}/try -vvv --debug-all --server --use-tor
>   -> KS_GET -- 0x6C6ACD6417B3ACB1

That's not a STC.  STC means a simple, self-contained piece of (ideally)
C code to reproduce the issue.  I simply don't have the time to hunt
down something in lots of foreign code.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Cygwin Dirmngr and TBB for windows
  2018-08-31 16:47         ` Corinna Vinschen
@ 2018-08-31 20:37           ` Brian Inglis
  0 siblings, 0 replies; 7+ messages in thread
From: Brian Inglis @ 2018-08-31 20:37 UTC (permalink / raw)
  To: cygwin

On 2018-08-31 02:34, Corinna Vinschen wrote:
> On Aug 30 21:20, john doe wrote:
>> On 8/30/2018 5:07 PM, Corinna Vinschen wrote:
>>> On Aug 30 14:35, Marco Atzeri wrote:
>>>> Am 30.08.2018 um 11:30 schrieb john doe:
>>>>> On 7/11/2018 10:11 AM, john doe wrote:
>>>>>> I'm trying to get Cygwin dirmngr to work with  Tor Browser for Windows.
>>>>>> Following some discussion on the gnupg user list it looks like that
>>>>>> the connect(2) function in Cygwin does not return the proper error
>>>>>> code:
>>>>>> https://lists.gnupg.org/pipermail/gnupg-users/2018-July/060768.html
>>>>>> On the above link one of the dev suggest that connect(2) returns
>>>>>> EPERMS instead of ECONREFUSED.
>>>>>> If ECONREFUSED is not returned when port 9050 is queried the
>>>>>> fallback code in dirmngr will not be executed and port 9150 will
>>>>>> never be used.
>>>>>> Using dirmngr on Debian with TBB for linux works as expected.
>>>>>> Can anyone confirm that and subsequently make Cygwin return the
>>>>>> proper error code?
>>>>>> Any help is appriciated.
>>>>> Has any one has been able to confirm that the issue is present in Cygwin
>>>>> code?
>>>>> I didn't see anything regarding this issue in the beta version of Cygwin
>>>>> or did I miss it?
>>>> a Simple Test Case will help to verify the claim.
>>> Full ACK.
>>>> connect is not expected to return EPERM
>>>> http://pubs.opengroup.org/onlinepubs/9699919799/functions/connect.html
>>> Cygwin does not explicitely generate EPERM anywhere near AF_INET/AF_INET6
>>> code. Nor does a Winsock error exist which gets gonverted to EPERM.
>>> The *only* way to generate EPERM is if an underlying Winsock function 
>>> returns an error code not handled by Cygwin. I never encountered that
>>> case, though. Thus, a STC is highly appreciated.
>> Thanks both for your answer and your willingness to look into this.
>> STC:
>> 1) Have Tor Browser for Windows up and running.
>> 2) Start dirmngr:
>> $ mkdir ${HOME}/try
>> $ dirmngr --homedir ${HOME}/try -vvv --debug-all --server --use-tor
>> -> KS_GET -- 0x6C6ACD6417B3ACB1
> That's not a STC. STC means a simple, self-contained piece of (ideally)
> C code to reproduce the issue. I simply don't have the time to hunt
> down something in lots of foreign code.

We may be able to run most Windows console apps interoperating with Cygwin
console apps, but with some Windows GUI apps about all we may be able to do is
launch them with cygstart: trying to integrate a security related app based on
an old release of an app designed for another platform offers too many
opportunities for mismatches.

As the OP has Debian TBB and dirmngr, why not use them, maybe from Cygwin/X?
Or the OP could install and run GNU PG/2 for Windows with TBB for Windows so the
apps would be working on the same basis and making the same assumptions about
paths, certs, IPC, perms, and errors.

Alternatively the OP could try building the Tor Browser from source to run under
Cygwin/X for use with Cygwin dirmngr, although as Tor is based on (old) Firefox,
and that is not available under Cygwin/X, and available browsers tend to be
lightweights, there may be too many porting issues from embedded Unix and
Windows assumptions to make that feasible, as I'm sure someone has (or maybe a
few have) tried that.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-08-31 19:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-11  8:11 Cygwin Dirmngr and TBB for windows john doe
2018-08-30 14:51 ` john doe
2018-08-30 15:07   ` Marco Atzeri
2018-08-30 23:41     ` Corinna Vinschen
2018-08-31  4:37       ` john doe
2018-08-31 16:47         ` Corinna Vinschen
2018-08-31 20:37           ` Brian Inglis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).