I believe core version 0.10.0+ uses deterministic k-value generation following the guidelines in RFC6979. The code for this is in the newly used libsecp256k1.
It you want to make random k-values, rollback to a version using openssl, or write your own code.
Note that if you generate R-values or S-values that are too high, the network will or may reject them (as detailed in
BIP0062).