openssl x509 -in stackexchangecom.crt -text -noout
openssl x509 -in cert.pem -text -noout
openssl x509 -inform der -in foobar.cer -noout -text
| using System.Xml; | |
| using System.Xml.Linq; | |
| namespace XmlLib | |
| { | |
| /// <summary> | |
| /// Provides extension methods for simple conversion between System.Xml and System.Xml.Linq classes. | |
| /// </summary> | |
| /// <remarks>From: http://brianary.blogspot.com/2010/02/converting-between-xdocument-and.html</remarks> | |
| public static class XmlLinqConversionExtensions |
| public class AuthenticatingHandler<T> : DelegatingHandler where T : ISecurityTokenAccessor | |
| { | |
| private readonly Policy<HttpResponseMessage> _policy; | |
| private readonly T _securityTokenAccessor; | |
| private IAccessToken _accessToken; | |
| private AuthenticationHeaderValue _authenticationHeader; | |
| public AuthenticatingHandler(T securityTokenAccessor) | |
| { | |
| _securityTokenAccessor = securityTokenAccessor; |
| using CertLib; | |
| using System; | |
| using System.Security.Cryptography; | |
| using System.Security.Cryptography.X509Certificates; | |
| namespace KeyGenSigning | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) |
| using Org.BouncyCastle.Asn1.Pkcs; | |
| using Org.BouncyCastle.Asn1.Sec; | |
| using Org.BouncyCastle.Asn1.X509; | |
| using Org.BouncyCastle.Asn1.X9; | |
| using Org.BouncyCastle.Crypto; | |
| using Org.BouncyCastle.Crypto.Generators; | |
| using Org.BouncyCastle.Crypto.Operators; | |
| using Org.BouncyCastle.Crypto.Parameters; | |
| using Org.BouncyCastle.Math; | |
| using Org.BouncyCastle.Security; |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>File Upload example</title> | |
| <link href="/Content/bootstrap.css" rel="stylesheet" /> | |
| </head> | |
| <body> | |
| <form action="api/Upload" method="post"> | |
| <div class="form-group"> |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Reflection; | |
| using System.Xml; | |
| using System.Xml.Linq; | |
| /// <summary> | |
| /// Extension methods for the dynamic object. | |
| /// </summary> |
| <div class="row"> | |
| <div class="col-md-3"> | |
| <h3>Select files</h3> | |
| <input type="file" #fileInput multiple (change)="addToQueue()" /> | |
| </div> | |
| <div class="col-md-9"> | |
| <h3>Upload queue</h3> | |
| <table class="table-headed table-striped"> |
| package auth | |
| import ( | |
| "context" | |
| "net/http" | |
| "strings" | |
| "google.golang.org/grpc/metadata" | |
| "github.com/andela/micro-api-gateway/pb/authorization" |