code: public BigInteger getSerialNumber() {
          SerialNumber ser = getSerialNumberObject();
  
          return ser != null ? ser.getNumber() : null;
      }
docs: Gets the serial number from the certificate.
  
  @return the serial number.