if ((ret->pkey.ecdsa = d2i_ECDSAPublicKey(&(ret->pkey.ecdsa),
if ((ret->pkey.ecdsa = ECDSAPublicKey_set_octet_string(&(ret->pkey.ecdsa),
EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, unsigned char **pp,	     long length)	{	EVP_PKEY *ret;	if ((a == NULL) || (*a == NULL))		{		if ((ret=EVP_PKEY_new()) == NULL)			{			ASN1err(ASN1_F_D2I_PUBLICKEY,ERR_R_EVP_LIB);			return(NULL);			}		}	else	ret= *a;	ret->save_type=type;	ret->type=EVP_PKEY_type(type);	switch (ret->type)		{#ifndef OPENSSL_NO_RSA	case EVP_PKEY_RSA:		if ((ret->pkey.rsa=d2i_RSAPublicKey(NULL,			(const unsigned char **)pp,length)) == NULL) /* TMP UGLY CAST */			{			ASN1err(ASN1_F_D2I_PUBLICKEY,ERR_R_ASN1_LIB);			goto err;			}		break;#endif#ifndef OPENSSL_NO_DSA	case EVP_PKEY_DSA:		if ((ret->pkey.dsa=d2i_DSAPublicKey(&(ret->pkey.dsa),			(const unsigned char **)pp,length)) == NULL) /* TMP UGLY CAST */			{			ASN1err(ASN1_F_D2I_PUBLICKEY,ERR_R_ASN1_LIB);			goto err;			}		break;#endif#ifndef OPENSSL_NO_ECDSA	case EVP_PKEY_ECDSA:		if ((ret->pkey.ecdsa = d2i_ECDSAPublicKey(&(ret->pkey.ecdsa), 			(const unsigned char **)pp, length)) == NULL)			{			ASN1err(ASN1_F_D2I_PUBLICKEY, ERR_R_ASN1_LIB);			goto err;			}	break;#endif	default:		ASN1err(ASN1_F_D2I_PUBLICKEY,ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE);		goto err;		/* break; */		}	if (a != NULL) (*a)=ret;	return(ret);err:	if ((ret != NULL) && ((a == NULL) || (*a != ret))) EVP_PKEY_free(ret);	return(NULL);	}