protected void encodePayload() throws IOException { try { payload = certificate.getEncoded(); } catch (CertificateEncodingException cee) { throw new IOException(cee.toString()); } } }
protected void encodePayload() throws IOException { ByteArrayOutputStream bout = new ByteArrayOutputStream(1024); byte[] enc = null; try { for (int i = 0; i < path.length; i++) { bout.write(path[i].getEncoded()); } } catch (CertificateEncodingException cee) { throw new IOException(cee.toString()); } payload = bout.toByteArray(); } }
private void writeCertArray(Writer writer, Certificate[] certificates) throws IOException { if (certificates == null) { writer.write("-1\n"); return; } try { writer.write(Integer.toString(certificates.length) + '\n'); for (Certificate certificate : certificates) { byte[] bytes = certificate.getEncoded(); String line = Base64.encode(bytes); writer.write(line + '\n'); } } catch (CertificateEncodingException e) { throw new IOException(e.toString()); } }
private void encodeCertificate( Certificate cert, DataOutputStream dOut) throws IOException { try { byte[] cEnc = cert.getEncoded(); dOut.writeUTF(cert.getType()); dOut.writeInt(cEnc.length); dOut.write(cEnc); } catch (CertificateEncodingException ex) { throw new IOException(ex.toString()); } }
private void encodeCertificate( Certificate cert, DataOutputStream dOut) throws IOException { try { byte[] cEnc = cert.getEncoded(); dOut.writeUTF(cert.getType()); dOut.writeInt(cEnc.length); dOut.write(cEnc); } catch (CertificateEncodingException ex) { throw new IOException(ex.toString()); } }
private void encodeCertificate( Certificate cert, DataOutputStream dOut) throws IOException { try { byte[] cEnc = cert.getEncoded(); dOut.writeUTF(cert.getType()); dOut.writeInt(cEnc.length); dOut.write(cEnc); } catch (CertificateEncodingException ex) { throw new IOException(ex.toString()); } }
private void encodeCertificate( Certificate cert, DataOutputStream dOut) throws IOException { try { byte[] cEnc = cert.getEncoded(); dOut.writeUTF(cert.getType()); dOut.writeInt(cEnc.length); dOut.write(cEnc); } catch (CertificateEncodingException ex) { throw new IOException(ex.toString()); } }
private void encodeCertificate( Certificate cert, DataOutputStream dOut) throws IOException { try { byte[] cEnc = cert.getEncoded(); dOut.writeUTF(cert.getType()); dOut.writeInt(cEnc.length); dOut.write(cEnc); } catch (CertificateEncodingException ex) { throw new IOException(ex.toString()); } }
private void encodeCertificate( Certificate cert, DataOutputStream dOut) throws IOException { try { byte[] cEnc = cert.getEncoded(); dOut.writeUTF(cert.getType()); dOut.writeInt(cEnc.length); dOut.write(cEnc); } catch (CertificateEncodingException ex) { throw new IOException(ex.toString()); } }
Log.e(TAG, e1.toString(), e1); } catch (CertificateEncodingException e) { Log.e(TAG, e.toString(), e);
subject = x509Struct.getSubject(); } catch(CertificateEncodingException e) { log.warn(e.toString()+" while retrieving subject from certificate to create CSR. Using subjectDN instead."); subject = new X509Name(cert.getSubjectDN().toString());
throw new IllegalArgumentException("Cannot encode object: " + e.toString());
throw new IllegalArgumentException("Cannot encode object: " + e.toString());
throw new IOException("Cannot encode object: " + e.toString());