Let the rotation axis be a line through a fixed point $(x_0,y_0,z_0,1)^T$ and an infinite point (direction of the line) $(a,b,c,0)^T$, without loss of generality, we assume $a^2+b^2+c^2=1$. Use right-handed rule for rotation, then a general homogeneous rotation with angle $\theta$ can be obtained as:
$ \boldsymbol{R}^{3D}\left(x_0,y_0,z_0,a,b,c,\theta\right)=\mathscr{C}_1+\left(\sin\theta\cdot\mathscr{A}_2- \left(1-\cos\theta\right)\cdot\mathscr{O}_3\right)\cdot \mathscr{T}_4 $
where: $\mathscr{C}_1= \left[\begin{array}{*{20}{c}} 1&0&0&0\\ 0&1&0&0\\ 0&0&1&0\\ 0&0&0&2-\cos\theta \end{array}\right]$
$\mathscr{A}_2 = {\begin{array}{c} \underbrace{ \begin{array}{c} {{\left[ {\begin{array}{*{20}{c}} {\color{blue}0}&{\color{blue}-c}&{\color{blue}b}&0\\ {\color{blue}c}&{\color{blue}0}&{\color{blue}-a}&0\\ {\color{blue}-b}&{\color{blue}a}&{\color{blue}0}&0\\ 0&0&0&0 \end{array}} \right]}} \end{array} } \\ \text{Antisymmetric matrix} \end{array}} $
$ \quad\mathscr{O}_3= \begin{array}{c} \underbrace{ {I - {\left[ {\begin{array}{*{20}{c}} a\\ b\\ c\\ 0 \end{array}} \right] \cdot \left[ {\begin{array}{*{20}{c}} a&b&c&0 \end{array}} \right]}} }\\ \text{Orthographic parallel projection} \end{array} $
$ \mathscr{T}_4=\begin{array}{c} \underbrace{\left[ {\begin{array}{*{20}{c}} 1&0&0&{ - {x_0}}\\ 0&1&0&{ - {y_0}}\\ 0&0&1&{ - {z_0}}\\ 0&0&0&1 \end{array}} \right]}\\ \text{Translation}\end{array}$
The L-C formulation of homogeneous 3D rotation is similar to Rodrigues' but they are not the same in essence. Details are available here: A submission on homogeneous rotation to arXiv.org
For your case, substitute $x_0=y_0=z_0=0$, $a=b=0$, $c=1$ and $\theta=\dfrac{\pi}{2}$ into the L-C formulation then you can obtain the desired homogeneous rotation matrix.