commit | 46106a9d754c7a878d85b2e3cf1e541edb8e16a4 | [log] [tgz] |
---|---|---|
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | Sun Feb 10 12:51:17 2013 +0100 |
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | Sun Feb 10 12:51:17 2013 +0100 |
tree | f9ee66404e73697d3840c4e59440a4ec6f9ae6bf | |
parent | 420f1eb675c89afebb7feefb7b2d64c355839921 [diff] [blame] |
Add tests for (and fix bug in) ecp_tls_write_group
diff --git a/library/ecp.c b/library/ecp.c index 233c2eb..cc79b77 100644 --- a/library/ecp.c +++ b/library/ecp.c
@@ -69,6 +69,8 @@ if( grp == NULL ) return; + grp->id = 0; + mpi_init( &grp->P ); mpi_init( &grp->B ); ecp_point_init( &grp->G ); @@ -632,7 +634,7 @@ * Next two bytes are the namedcurve value */ buf[0] = grp->id >> 8; - buf[1] = grp->id && 0xFF; + buf[1] = grp->id & 0xFF; return 0; }