code: private void readSigningKeyAndCertificate(Configuration conf) throws OfficeWriterException, IOException {
  	if ((this.howc.getSigKeystoreFile()!=null) && (!"".equals(this.howc.getSigKeystoreFile()))) {
  		LOG.info("Signing document");
  		if ((this.howc.getSigKeystoreAlias()==null) || ("".equals(this.howc.getSigKeystoreAlias()))) {
  				LOG.error("Keystore alias for signature keystore not defined. Cannot sign document");
  				throw new OfficeWriterException("Keystore alias for signature keystore not defined. Cannot sign document");
  		}
  		if ((this.howc.getSigKeystoreType()==null) || ("".equals(this.howc.getSigKeystoreType()))) {
  			LOG.error("Keystore type for signature keystore not defined. Cannot sign document");
  			throw new OfficeWriterException("Keystore type for signature keystore not defined. Cannot sign document");
  		}
  		LOG.info("Reading keystore");
  		HadoopKeyStoreManager hksm = new HadoopKeyStoreManager(conf);
  		try {
  			hksm.openKeyStore(new Path(this.howc.getSigKeystoreFile()), this.howc.getSigKeystoreType(), this.howc.getSigKeystorePassword());
  			this.howc.setSigKey(hksm.getPrivateKey(this.howc.getSigKeystoreAlias(), this.howc.getSigKeystorePassword()));
  			this.howc.setSigCertificate((X509Certificate) hksm.getCertificate(this.howc.getSigKeystoreAlias()));
  		} catch (NoSuchAlgorithmException | CertificateException | KeyStoreException | IllegalArgumentException | UnrecoverableKeyException  e) {
  			LOG.error("Cannopt read signing certificate. Exception: ",e);
  			throw new OfficeWriterException("Cannot read keystore to obtain key and certificate for signing "+e);
  		}
  		
  		
  	}
  }
docs: *
  Reads the  (private) key and certificate from keystore to sign
  
  @param conf
  @throws OfficeWriterException
  @throws IOException