[go-nuts] Re: parse output of exec.Command

2025-03-27 Thread natxo....@gmail.com
hi Jason, Thanks! Very nice code. In my use case the output is coming from openvpn cli (more precisely, openvpn --show-pkcs11-ids /path/to/opensc-pkcs11.so to get the a list of certificates on a smartcard, so not looking at the certificates themselves. I need to configure the config file for a

[go-nuts] Re: parse output of exec.Command

2025-03-27 Thread Jason E. Aten
Hi Natxo, You can also use "crypto/x509" x509.ParseCertificate() after pem.Decode() from "encoding/pem", if you are only loading certificates and want a more rigorous way to determine the certificate's contents. Example here: https://github.com/glycerine/rpc25519/blob/master/selfcert/step5_view

[go-nuts] Re: parse output of exec.Command

2025-03-27 Thread natxo....@gmail.com
obviously as soon as I post the question I think of the answer myself. I need to use pointers. Sorry for the noise, it's working now. On Thursday, March 27, 2025 at 3:31:29 PM UTC+1 natxo@gmail.com wrote: > hi, > > I am trying to parse he output of a command and not getting the desired > r