//helper function to get the der bytes from a Kr object.
helper function to get the der bytes from a Kr object.
// helper function to get the der bytes from a Kr object .
func extractDERKey(Kr interface{}) ([]byte, error) {
	var key *rsa.PrivateKey
	var ok bool
	if key, ok = Kr.(*rsa.PrivateKey); !ok {
		return nil, errors.New("crypto/tls: found non-RSA private key")
	}
	private_key_der := GoX509.MarshalPKCS1PrivateKey(key)
	return private_key_der, nil
}
func extractDERKey ( Kr interface { } ) ( [ ] byte , error ) { var key * rsa . PrivateKey var ok bool if key , ok = Kr . ( * rsa . PrivateKey ) ; ! ok { return nil , errors . New ( " " ) } private_key_der := GoX509 . MarshalPKCS1PrivateKey ( key ) return private_key_der , nil }
helper function to get the der bytes from a Kr object.
helper function to get the der bytes from a Kr object .
//cast to rsa //get the raw bytes