code: func GetECParamMarshaled(namedCurve string) (ecParamMarshaled []byte, err error) {
  
  	// RFC 5480, 2.1.1.1. Named Curve
  	//
  	// secp224r1 OBJECT IDENTIFIER ::= {
  	//   iso(1) identified-organization(3) certicom(132) curve(0) 33 }
  	//
  	// secp256r1 OBJECT IDENTIFIER ::= {
  	//   iso(1) member-body(2) us(840) ansi-X9-62(10045) curves(3)
  	//   prime(1) 7 }
  	//
  	// secp384r1 OBJECT IDENTIFIER ::= {
  	//   iso(1) identified-organization(3) certicom(132) curve(0) 34 }
  	//
  	// secp521r1 OBJECT IDENTIFIER ::= {
  	//   iso(1) identified-organization(3) certicom(132) curve(0) 35 }
  	//
  	// NB: secp256r1 is equivalent to prime256v1
  
  	ecParamOID := asn1.ObjectIdentifier{}
  
  	switch namedCurve {
  	case "P-224":
  		ecParamOID = asn1.ObjectIdentifier{1, 3, 132, 0, 33}
  	case "P-256":
  		ecParamOID = asn1.ObjectIdentifier{1, 2, 840, 10045, 3, 1, 7}
  	case "P-384":
  		ecParamOID = asn1.ObjectIdentifier{1, 3, 132, 0, 34}
  	case "P-521":
  		ecParamOID = asn1.ObjectIdentifier{1, 3, 132, 0, 35}
  	}
  
  	if len(ecParamOID) == 0 {
  		err = fmt.Errorf("error with curve name: %s", namedCurve)
  		return
  	}
  
  	ecParamMarshaled, err = asn1.Marshal(ecParamOID)
  	return
  }
docs: /* returns value for CKA_EC_PARAMS */