case NAMED_CURVE:
// http://tools.ietf.org/html/rfc4492#section-5.4
writer.write(NAMED_CURVE, CURVE_TYPE_BITS);
writer.write(curveId, NAMED_CURVE_BITS);
writer.write(pointEncoded.length, PUBLIC_LENGTH_BITS);
writer.writeBytes(pointEncoded);
// signature
if (signatureEncoded != null) {
// according to http://tools.ietf.org/html/rfc5246#section-A.7 the
// signature algorithm must also be included