| 100 | } |
| 101 | |
| 102 | void fromwire_pubkey(const u8 **cursor, size_t *max, struct pubkey *pubkey) |
| 103 | { |
| 104 | u8 der[PUBKEY_CMPR_LEN]; |
| 105 | |
| 106 | if (!fromwire(cursor, max, der, sizeof(der))) |
| 107 | return; |
| 108 | |
| 109 | if (!pubkey_from_der(der, sizeof(der), pubkey)) { |
| 110 | SUPERVERBOSE("not a valid point"); |
| 111 | fromwire_fail(cursor, max); |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | void towire_pubkey(u8 **pptr, const struct pubkey *pubkey) |
| 116 | { |
no test coverage detected