Permalink
Browse files

Added example certs to examples/basic/.

  • Loading branch information...
1 parent b27342d commit 0ea66ea2c94351fc663de572b83ec35bf07d0024 @davidmoreno committed Nov 16, 2010
Showing with 51 additions and 3 deletions.
  1. +2 −3 examples/basic/basic.c
  2. +27 −0 examples/basic/cert.key
  3. +22 −0 examples/basic/cert.pem
View
@@ -1,12 +1,11 @@
-/** Licensed undel AGPL 3.0. (C) 2010 David Moreno Montero */
+/** Licensed under AGPL 3.0. (C) 2010 David Moreno Montero */
#include <onion/onion.h>
#include <handlers/onion_handler_directory.h>
#include <handlers/onion_handler_auth_pam.h>
int main(int argc, char **argv){
onion *o=onion_new(O_THREADED);
- if (onion_use_certificate(o, O_SSL_CERTIFICATE_KEY, "cert.pem", "cert.key")!=0) // No SSL, no fun
- return 1;
+ onion_use_certificate(o, O_SSL_CERTIFICATE_KEY, "cert.pem", "cert.key");
onion_set_root_handler(o, onion_handler_auth_pam("Onion Example", "login", onion_handler_directory(".")));
onion_listen(o);
onion_free(o);
View
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEoAIBAAKCAQEAnNiZtpaW8fBh8QLPtPI4nVUyrbJMRQozczZSFPnSUz1o0qEE
+1DElBEpZPWIdNCKEg10mWexZit+rY7XKPNsdfBudD4yo5lm59q/Iv0CfYp/XzoK+
+y0UP7VxlzpToUMMuXuNasAjd+Ekix0+kBrJkeAUx2guXTIFVCI3zL48UyAKZJFU+
+6tXXZtpP+yQVRSzOlbaaAGPsUuGv1HSLhqSaXeorO+UvU9q/dCiWwJK58yr++61C
+Do1nNJF7NkerVfxRkFrXbGQBtzmdwOJkm6I4Ncuc/SV1amMkt4/iJwIlZFZ0pCNd
+7z0FZH9D9OM8QAFpUImwiCN6Dmn4euA+yZt9KQIDAQABAoH/I9YMr0s0rY54a+Nh
+FgFslHUC6ezh83VfFI+bJLQJYKHcpJi6/5XMB+iF7nXPmH4f1ZcOoYFlYwaicSfm
++h50KNPqmX6lqaaWmN37tWGhs754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