Please check out the information provided in this thread:
It says that you have to live in Germany for 6 years before you can apply for German nationality. This waiting period starts at the very moment that you apply for asylum. So the time you spend in the asylum procedure already adds up to the 6 years.
For extensive information about the topic of naturalization please check out this website by BAMF (English language): ****://***.bamf.de/EN/Willkommen/Einbuergerung/InDeutschland/indeutschland-node.html
Here is a summary of the most important requirements that you need to fulfil:
- you have an unrestricted right of residence at the time of being naturalised (your residence permit is sufficient)
- you have passed the naturalisation test (aka "Einbürgerungstest")
- your place of residence has been in Germany for six years (of course you can travel in the meantime, but in general no longer than 3 months at once)
- you have a job that gives you enough income to make a living without being dependent on social benefits
- you have adequate German-language skills (B1 should be sufficient)
- you didn't commit any severe crimes
- you are committed to the free democratic constitutional order of the Basic Law of the Federal Republic of Germany
- you have lost or given up your home country's nationality
I hope this answer was helpful to you.