- if ((keydata->data[6] == 8) &&
- (keydata->data[7] == 0x2A) &&
- (keydata->data[8] == 0x86) &&
- (keydata->data[9] == 0x48) &&
- (keydata->data[10] == 0xCE) &&
- (keydata->data[11] == 0x3D) &&
- (keydata->data[12] == 0x03) &&
- (keydata->data[13] == 0x01) &&
- (keydata->data[14] == 0x07)) {
+ oid = onak_parse_oid(&keydata->data[keyofs],
+ keydata->length - keyofs);
+ if (oid == ONAK_OID_CURVE25519) {
+ length = 255;
+ } else if (oid == ONAK_OID_ED25519) {
+ length = 255;
+ } else if (oid == ONAK_OID_NISTP256) {