State-of-art powered prosthetic legs are often controlled using a collection of joint impedance controllers designed for different phases of a walking cycle. Consequently, finite state machines are used to control transitions between different phases. This approach requires a large number of impedance parameters and switching rules to be tuned. Since one set of control parameters cannot be used across different amputees, clinicians spend enormous time tuning these gains for each patient. This paper proposes a virtual constraint-based control scheme with a smaller set of control parameters, which are automatically tuned in real-time using an extremum seeking controller (ESC). ESC, being a model-free control method, assumes no prior knowledge of either the prosthesis or human. Using a singular perturbation analysis, we prove that the virtual constraint tracking errors are small and the PD gains remain bounded. Simulations demonstrate that our ESC-based method is capable of adapting the virtual-constraint based control parameters for amputees with different masses.