keygen/src/ssl.c
/**
 * public_key_encode_x962() - Encode a public key from an EVP_PKEY structure
 *
 * Caller must free the returned buffer
 *
 * Return: A new buffer containing the x9.62-encoded string
 */
Encode a public key from an EVP_PKEY structure
Caller must free the returned buffer

A new buffer containing the x9.62-encoded string
Encode a public key from an EVP_PKEY structure Caller must free the returned buffer A new buffer containing the x9 . 62 - encoded string
static char *public_key_encode_x962(EC_KEY *key)
{
    const EC_POINT * point = NULL;
    char *hex = NULL;
    if (!key) {
        printf("%s Could not get EC_KEY from pkey", __func__);
        goto out;
    }
    point = EC_KEY_get0_public_key(key);
    if (!point) {
        printf("%s Could not get point from EC_KEY", __func__);
        goto out;
    }
    hex = EC_POINT_point2hex(EC_KEY_get0_group(key), point, POINT_CONVERSION_UNCOMPRESSED, NULL);
out:
    return hex;
}
static char * public_key_encode_x962 ( EC_KEY * key ) { const EC_POINT * point = NULL ; char * hex = NULL ; if ( ! key ) { printf ( " " , __func__ ) ; goto out ; } point = EC_KEY_get0_public_key ( key ) ; if ( ! point ) { printf ( " " , __func__ ) ; goto out ; } hex = EC_POINT_point2hex ( EC_KEY_get0_group ( key ) , point , POINT_CONVERSION_UNCOMPRESSED , NULL ) ; out : return hex ; }
public_key_encode_x962() - Encode a public key from an EVP_PKEY structure
 Caller must free the returned buffer
public_key_encode_x962 () - Encode a public key from an EVP_PKEY structure Caller must free the returned buffer