Yes, the ancient OpenLDAP v1 was an LDAP v2 server. However, all modern
software uses LDAP v3. If you have software that isn't LDAP v3 compliant,
I suggest fixing it, or using an OpenLDAP v2 server that allows ldapv2
style connections.

If all you're doing is writing a client that wants to see the supported
versions, I suggest just querying the rootDSE to see what it says: