X509: re-use existing BER extraction code