孙 金龙 wrote: > thanks! i only want to read ec privatekey > my ec privatekey is below > -----BEGIN EC PRIVATE KEY----- > MGACAQEEGAu0lmj+Fgurl8m7Tpwi4+wZk9GRSgdyjKALBgkqgRzXYwEBAgGhNAMy > AQS0/wY++sZk+W3QERcmJ+5m1l+PKkaFhJelGBfWaDN4vmSZg7ltf8YtRaUVvyaS > m1I= > -----END EC PRIVATE KEY----- > so i use EVP_PKEY *prikey; > FILE *keyfp; > if (!(prikey = PEM_read_PrivateKey(keyfp, NULL, NULL, NULL))) > return 0; > return 1; > it always return 0,by the way the my ec curve is not in openssl ec curve > list.
the above ec private key specifies uses an OID to specify the ec group used but if openssl doesn't know the group it can't create a private key object. Cheers, Nils ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]