prog.c:1:3: warning: data definition has no type or storage class [enabled by default]
ec = EC_KEY_new();
^
prog.c:1:3: warning: type defaults to ‘int’ in declaration of ‘ec’ [-Wimplicit-int]
prog.c:1:3: warning: implicit declaration of function ‘EC_KEY_new’ [-Wimplicit-function-declaration]
prog.c:1:3: error: initializer element is not constant
prog.c:2:3: error: unknown type name ‘BN_CTX’
BN_CTX ctx( BN_CTX_new() );
^
prog.c:2:15: error: unknown type name ‘BN_CTX_new’
BN_CTX ctx( BN_CTX_new() );
^
prog.c:3:3: warning: data definition has no type or storage class [enabled by default]
BN_CTX_start( ctx );
^
prog.c:3:3: warning: type defaults to ‘int’ in declaration of ‘BN_CTX_start’ [-Wimplicit-int]
prog.c:3:3: warning: parameter names (without types) in function declaration [enabled by default]
prog.c:4:3: error: unknown type name ‘BIGNUM’
BIGNUM *a = BN_CTX_get( ctx );
^
prog.c:4:3: warning: implicit declaration of function ‘BN_CTX_get’ [-Wimplicit-function-declaration]
prog.c:4:27: error: ‘ctx’ undeclared here (not in a function)
BIGNUM *a = BN_CTX_get( ctx );
^
prog.c:5:3: error: expected identifier or ‘(’ before ‘!’ token
!BN_set_word( a, 3 );
^
prog.c:6:23: error: expected ‘)’ before numeric constant
BN_set_negative( a, 1 );
^
prog.c:7:3: error: unknown type name ‘EC_GROUP’
EC_GROUP grp( EC_GROUP_new_curve_GFp( pcurve, a, bcurve, ctx ) );
^
prog.c:7:17: error: unknown type name ‘EC_GROUP_new_curve_GFp’
EC_GROUP grp( EC_GROUP_new_curve_GFp( pcurve, a, bcurve, ctx ) );
^
prog.c:8:3: error: unknown type name ‘EC_POINT’
EC_POINT P( EC_POINT_new( grp ) );
^
prog.c:8:15: error: unknown type name ‘EC_POINT_new’
EC_POINT P( EC_POINT_new( grp ) );
^
prog.c:9:3: warning: data definition has no type or storage class [enabled by default]
EC_POINT_set_affine_coordinates_GFp( grp, P, xcurve, ycurve, ctx );
^
prog.c:9:3: warning: type defaults to ‘int’ in declaration of ‘EC_POINT_set_affine_coordinates_GFp’ [-Wimplicit-int]
prog.c:9:3: warning: parameter names (without types) in function declaration [enabled by default]
prog.c:10:43: error: expected ‘)’ before numeric constant
EC_GROUP_set_generator( grp, P, qcurve, 0 );
^
prog.c:11:3: warning: data definition has no type or storage class [enabled by default]
EC_KEY_set_group( ec, grp );
^
prog.c:11:3: warning: type defaults to ‘int’ in declaration of ‘EC_KEY_set_group’ [-Wimplicit-int]
prog.c:11:3: warning: parameter names (without types) in function declaration [enabled by default]