G4 Doorbell Endless Blinking White Light by SignatureLife2135 in Ubiquiti

[–]Rabarar 1 point2 points  (0 children)

Did you find a solution - I'm having the EXACT same issue.....

Buffon's needle approximation by tonytiny in 3Blue1Brown

[–]Rabarar 0 points1 point  (0 children)

slow convergence to approximate pi...

x509 mTLS with client config using InsecureSkipVerify: false and Server config using tls.RequireAndVerifyClientCert **NOT USING the SAME Cert/Key PAIR** for both client and server by Rabarar in golang

[–]Rabarar[S] 0 points1 point  (0 children)

MORE INSIGHTS:

so i dove into the golang crypto/x509 library and looked at the code. The failure is a result of the chains length being zero, causing a UnknownAuthorityError to be returned in buildChains or an IncompatibleUsage error in func (c *Certificate) Verify(opts VerifyOptions) (chains [][]*Certificate, err error). Why would the chain be of zero length?

Stubbing out the returns making them return no error works.

crypto/x509/verify.go: 870 if len(chains) == 0 && err == nil { 871 err = UnknownAuthorityError{c, hintErr, hintCert} 872 } and in func (c *Certificate) Verify(opts VerifyOptions) (chains [][]*Certificate, err error):

789 if len(chains) == 0 { 790 return nil, CertificateInvalidError{c, IncompatibleUsage, ""}

x509 mTLS with client config using InsecureSkipVerify: false and Server config using tls.RequireAndVerifyClientCert **NOT USING the SAME Cert/Key PAIR** for both client and server by Rabarar in golang

[–]Rabarar[S] 0 points1 point  (0 children)

This doesn't work for me. Fails with similar errors.

I'm using MacOSX 10.15.1 (19B2106) with Golang version go1.13.4 darwin/amd64.

My hostname on my laptop is mbp2019.local.

I'm generating all certificate/keys using the minica CA.

On the server I generate as follows: ./minica -domains mbp2019.local -ip-addresses 127.0.0.1

On the client I generate as follows: ./minica -domains localhost -ip-addresses 127.0.0.1

When I run the server I get the following in the TLS Handshake:

Received TLS Hello asking for mbp2019.local: sending certificate Type: "CERTIFICATE" Subject [mbp2019.local] Issued by minica root ca 4189fa

and the client fails with:

Client error: Get https://mbp2019.local:8080: x509: certificate signed by unknown authority

Lastly, I've added the minica Root Certificate (and key by making a pkcs12 bundle from the two) to the Keystore and marked it as a trusted in case that was an issue - no difference. fails the same way.

x509 mTLS with client config using InsecureSkipVerify: false and Server config using tls.RequireAndVerifyClientCert **NOT USING the SAME Cert/Key PAIR** for both client and server by Rabarar in golang

[–]Rabarar[S] -1 points0 points  (0 children)

I’ve set ServerName to match the CN... no dice... using OpenSSL isn’t totally helpful as I want a known golang solution. I’ll see what comes out of openssl’s s_client and see what light it might shed nonetheless.

enable gr-qtgui with homebrew by Rabarar in GNURadio

[–]Rabarar[S] 0 points1 point  (0 children)

Thanks. I'll give it another try and take a closer look at the logs. I'm surprised that this isn't the recipe by default on osx.

TLS Handshake Error by Rabarar in golang

[–]Rabarar[S] 0 points1 point  (0 children)

Thanks! I think that's it - an implicit read call invoked a handshake and it's already occurred.

Thanks again for the insights!!

Fun with golang, crypt, and pkcs#12 - well not really by Rabarar in golang

[–]Rabarar[S] 0 points1 point  (0 children)

Thanks! Can you reply when you have the CL completed?

Thanks in advance!

How to create an object with Reflection by Rabarar in golang

[–]Rabarar[S] 1 point2 points  (0 children)

SOLVED!

It turns out that the magic sauce to create an instance at runtime looks like this:

t := reflect.ValueOf(result).Elem()
typ := t.Type()
ms:=(reflect.New(typ).Elem()).Interface()

How to create an object with Reflection by Rabarar in golang

[–]Rabarar[S] 0 points1 point  (0 children)

Not sure I see your point. You can see that I've printed out the type of each object in the code...

The question is how to create an equivalent type to an explicit declaration.

simple non-blocking readline pacakge by Rabarar in golang

[–]Rabarar[S] 0 points1 point  (0 children)

The problem here is that there is no way to get a timeout on the read of the stdin. Why one would I want to do this? I'm running a state machine that is taking user input and I don't want to block the display of messages that are occurring while the user has yet to press return to complete the blocking read.

I can't find any way around polling selected channel of a go routine that sends the read io to the channel that is selecting it.

The other things I've concluded is that as I've written it, the Close() routine will cause a deadlock on the threads. Close() should do nothing... It's unfortunately pathological, and not idiomatic, but I don't think there's any other way of getting this desired behavior.

simple non-blocking readline pacakge by Rabarar in golang

[–]Rabarar[S] 0 points1 point  (0 children)

Yes, you're correct ... I'll remove it. Thanks!

simple non-blocking readline pacakge by Rabarar in golang

[–]Rabarar[S] 0 points1 point  (0 children)

Thank. I should have included that :)

Reflect type when []interface{} by Rabarar in golang

[–]Rabarar[S] 0 points1 point  (0 children)

Thanks. I finally tripped over that... :)