hi,

as a learning exercise I would lke to loop through the system's certificate 
authorities store, and get the subjects of each certificate authority.

I have this code:

package main

import "fmt"
import "crypto/x509"

func main() {
    store, err := x509.SystemCertPool()
    if err != nil {
        panic(err)
    }
    fmt.Printf("%T\n", store)
    subjects := store.Subjects()
    fmt.Printf("%T\n", subjects)
    for _, v := range subjects {
        fmt.Printf("%T\n", v)
        fmt.Println(string(v))
    }
}

But I am getting a lot of gibberish. 

There should be a better way to do this, but I obviously do not know it. 

Thanks for any pointers.

-- 
regards,
Natxo

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to