diff --git a/src/libstrongswan/plugins/openssl/openssl_x509.c b/src/libstrongswan/plugins/openssl/openssl_x509.c index f7bef0d03..db227c548 100644 --- a/src/libstrongswan/plugins/openssl/openssl_x509.c +++ b/src/libstrongswan/plugins/openssl/openssl_x509.c @@ -224,10 +224,20 @@ static identification_t *general_name2id(GENERAL_NAME *name) { return identification_create_from_encoding(ID_IPV4_ADDR, chunk); } + if (chunk.len == 8) + { + return identification_create_from_encoding(ID_IPV4_ADDR_SUBNET, + chunk); + } if (chunk.len == 16) { return identification_create_from_encoding(ID_IPV6_ADDR, chunk); } + if (chunk.len == 32) + { + return identification_create_from_encoding(ID_IPV6_ADDR_SUBNET, + chunk); + } return NULL; } case GEN_DIRNAME :