Primality test in GPG/RSA or extract numbers of private key
GPG (1.4.21) does not use an elliptic curve primality test. It uses 5 strong pseudoprime tests, with the first to base 2 and the others to a random base. For factors large enough that the key is secure, odds that a composite creep by chance are entirely negligible in practice (for a quantitative estimate see appendix F.1 in FIPS 186-4). Also, the mere fact that an RSA key allows decryption of messages, or generation of signatures that verify, is a fair probabilistic primality test of its factors.

To dump a private key not protected by a passphrase under gpg 1.4.x, use
gpg --export-secret-key -a "john doe" | gpg --list-packets --debug 2

For a key version 4 algo 1, the factors of the public modulus are skey[3] and skey[4].