如何从Pem文件中获取subject_hash(md5)

I have a pem file that I am trying to get the subject_has for in Go.

In command line:

wmachs-iphone:platform-tools user$ openssl x509 -noout -subject_hash_old -in ../charles-ssl-proxying-certificate.pem
e64b345

I've tried using https://golang.org/pkg/crypto/md5/ (no luck, md5 value is different) and https://godoc.org/github.com/spacemonkeygo/openssl==> slight learning curve that I need help on. I tried loading the Pem file but not sure how to get the MD5 portion:

pemfile,_ := openssl.LoadCertificateFromPEM(buf.Bytes())

Any ideas?

package main

import (
    "fmt"
    "io/ioutil"
    "regexp"
)

func main() {
    regex := regexp.MustCompile("(
)?-----(.)*-----
")
    data, _ := ioutil.ReadFile("file.pem")
    parts := regex.ReplaceAllString(string(data), "")
    fmt.Println(parts)
}