Yes, "I have known him for 10 years" is correct. If the process is continuing from the past to the present, using this form is correct. If it is something limited to the present (or a question that does not inquire of the history) you would use only the present tense.
So if you were asked, "how long have you known him?" The question is asking of the history and presuming you still know him. Thus you would answer, "I have known him for ten years."
If you were asked, "do you know him?" The question is only asking about the present so even if you have known him for ten years, your history with him is not necessary to answer the question, therefore you would respond, "Yes, I know him."