1 /* 2 * hunt-proton: AMQP Protocol library for D programming language. 3 * 4 * Copyright (C) 2018-2019 HuntLabs 5 * 6 * Website: https://www.huntlabs.net 7 * 8 * Licensed under the Apache-2.0 License. 9 * 10 */ 11 module hunt.proton.engine.impl.ssl.ProtonSslEngine; 12 13 import hunt.io.ByteBuffer; 14 15 //import javax.net.ssl.SSLEngine; 16 //import javax.net.ssl.SSLEngineResult; 17 //import javax.net.ssl.SSLEngineResult.HandshakeStatus; 18 //import javax.net.ssl.SSLEngineResult.Status; 19 //import javax.net.ssl.SSLException; 20 // 21 ///** 22 // * Thin wrapper around an {@link SSLEngine}. 23 // */ 24 //interface ProtonSslEngine 25 //{ 26 // /** 27 // * @see SSLEngine#wrap(ByteBuffer, ByteBuffer) 28 // * 29 // * Note that wrap really does write <em>one</em> packet worth of data to the 30 // * dst byte buffer. If dst byte buffer is insufficiently large the 31 // * pointers within both src and dst are unchanged and the bytesConsumed and 32 // * bytesProduced on the returned result are zero. 33 // */ 34 // SSLEngineResult wrap(ByteBuffer src, ByteBuffer dst) throws SSLException; 35 // 36 // /** 37 // * @see SSLEngine#unwrap(ByteBuffer, ByteBuffer) 38 // * 39 // * Note that unwrap does read exactly one packet of encoded data from src 40 // * and write to dst. If src contains insufficient bytes to read a complete 41 // * packet {@link Status#BUFFER_UNDERFLOW} occurs. If underflow occurs the 42 // * pointers within both src and dst are unchanged and the bytesConsumed and 43 // * bytesProduced on the returned result are zero. 44 // */ 45 // SSLEngineResult unwrap(ByteBuffer src, ByteBuffer dst) throws SSLException; 46 // 47 // Runnable getDelegatedTask(); 48 // HandshakeStatus getHandshakeStatus(); 49 // 50 // /** 51 // * Gets the application buffer size. 52 // */ 53 // int getEffectiveApplicationBufferSize(); 54 // 55 // int getPacketBufferSize(); 56 // String getCipherSuite(); 57 // String getProtocol(); 58 // boolean getUseClientMode(); 59 // 60 //}