분류 전체보기355 C++ istream, streambuf 간단 구현 예제 #include class input_buf : public std::streambuf{public: char read_buf_[32]; int read_pos_; int read_limit_; input_buf() { int i; for (i = 0; i setg(&read_buf_[read_pos_], &read_buf_[read_pos_], &read_buf_[read_pos_ + 8]); // The character at the current position of the controlled input sequence, as a value of type int. // 현재 위치의 값을 리턴함 .. 2019. 7. 19. AsymSecureFile (설명 추가중... github에 써야하는데...) AsymSecureFile은 Asymmetric기반 암호화를 이용하여 데이터 Sign/Encrypt를 구현하는 Java 라이브러리 입니다.(추후 C++도 지원예정) OperationType으로써 SIGN과 PUBLIC_ENCRYPT를 지원하며 RSA키와 EC키를 지원하고, Java에서는 PKCS11도 지원하여 HSM과 연동 가능합니다. SIGN은 PrivateKey로 데이터를 서명하며 이를 통해 데이터를 조작불가하게 전달하고 보관할 수 있습니다. 라이센스 검증 등에 유용하게 사용할 수 있습니다. PUBLIC_ENCRYPT는 PublicKey로 데이터를 암호화하여 데이터를 안전하게 전달하고 PrivateKey를 가진 자만 해당 데이터를 읽을 수 있습니다... 2019. 7. 12. EJBCA SSL인증서 갱신(재발급) https://doc.primekey.com/ejbca/ejbca-operations/ejbca-operations-guide/ca-operations-guide/end-entities/ssl-certificate-expiration SSL Certificate Expiration The SSL certificate used for SSL in JBoss is stored in APPSRV_HOME/server/default/conf/keystore.jks. The default validity time for the SSL certificate is two years. doc.primekey.com 참고. 추가로 4. Copy EJBCA_HOME/p12/tomcat.jks to APPSRV_HOME/s.. 2019. 7. 10. EJBCA Java WS API 연결 https://gist.github.com/jc-lab/773d809053184529b52a4089aab72a9e EjbcaConnector.java EjbcaConnector.java. GitHub Gist: instantly share code, notes, and snippets. gist.github.com 별건 아니구 EjbcaWS 연결할 때 인증서 검증 및 클라이언트 인증서 필요한데 Keystore파일이 아닌 KeyStore객체에서 가져오도록 한 것. 물론 좀더 수정 필요 2019. 7. 10. haproxy transparent 설정 하나의 포트를 이용하여 여러개의 서비스를 돌릴 때 haproxy를 이용할 수 있다. 하지만 이런 경우 실제 서비스하는 서버입장에서는 실제 클라이언트 IP를 알 수가 없다. (HTTP프로토콜에 한해서는 Header에 실제IP를 기입할 수 있다) 그렇게 때문에 필요한 경우 transparent 기능을 이용해야 한다. 보통은... INTERNET ------- (외부망)haproxy(내부망, default gateway역할) ------ Servers이런식으로 haproxy가 게이트웨이에서 동작할텐데 나는 INTERNET ----- GATEWAY(내부망) ---------- haproxy + 로컬서버 +----- Servers이런 식이다. 이런 경우 transparent가 동작하지 않게 된다. 일단 trans.. 2019. 7. 9. sslh & openvpn connection-reset 문제 sslh와 openvpn연동해서 사용할 때 SIGUSR1[soft,connection-reset] received, process restarting 오류가 뜬다면... /etc/default/sslh 에 -t 5 이렇게 timeout옵션을 줌으로(초기값이 아주 작은값인듯?) 해결되었다.. 아니네,... 또그러네...?? 참고로.. sslh에서 transparent모드를 사용하면 openvpn측에서 클라이언트 IP가 127.0.0.1이 아닌 실제 IP가 보이므로.. 좋다..^^ http://www.rutschle.net/tech/sslh/README.html Documentation sslh – A ssl/ssh multiplexer sslh accepts connections on specified p.. 2019. 7. 9. 이전 1 ··· 28 29 30 31 32 33 34 ··· 60 다음 반응형