q      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` a b c d e f g h i j k l m n o p q r s t u v w x yz{|}~     #Convert an integer to a hex string  #Convert a hex string to an integer !"# !"# $BIO is a  ForeignPtr> to an opaque BIO object. They are created by newXXX actions. %Computation of % a b connects b behind a.  Example:  do b64 <- newBase64 True  mem <- newMem  bioPush b64 mem  > -- Encode some text in Base64 and write the result to the  -- memory buffer. ! bioWrite b64 "Hello, world!"  bioFlush b64  $ -- Then dump the memory buffer.  bioRead mem >>= putStrLn &a & b is an alias to % a b. 'a ' b is an alias to % b a. (( [bio1, bio2, ..] connects many BIOs at once. )) bio3 normally writes out any internally buffered data, C in some cases it is used to signal EOF and that no more data will  be written. ** bio/ typically resets a BIO to some initial state. ++ bio returns 1 if bio has read EOF, the precise 2 meaning of EOF varies according to the BIO type. ,, bio lazily reads all data in bio. -- bio len attempts to read len bytes from bio, C then return a ByteString. The actual length of result may be less  than len. .. bio lazily reads all data in bio, then return a  LazyByteString. // bio len, normally attempts to read one line of data  from bio of maximum length len. There are exceptions to this  however, for example /$ on a digest BIO will calculate and 2 return the digest and other BIOs may not support / at all. 00 does the same as / but returns ByteString. 11 does the same as / but returns  LazyByteString. 22 bio str lazily writes entire str to bio. The  string doesn'!t necessarily have to be finite. 33 bio bs writes bs to bio. 44 bio lbs lazily writes entire lbs to bio. The  string doesn'!t necessarily have to be finite. 55 noNL/ creates a Base64 BIO filter. This is a filter E bio that base64 encodes any data written through it and decodes any  data read through it. If noNL; flag is True, the filter encodes the data all on one line , or expects the data to be all on one line. Base64 BIOs do not support /. ): on a Base64 BIO that is being written through is used to B signal that no more data is to be encoded: this is used to flush " the final block through the BIO. 66 mBufSize& creates a buffering BIO filter. Data D written to a buffering BIO is buffered and periodically written to A the next BIO in the chain. Data read from a buffering BIO comes ! from the next BIO in the chain. Buffering BIOs support /. Calling *. on a buffering BIO clears any buffered data. @Question: When I created a BIO chain like this and attempted to B read from the buf, the buffering BIO weirdly behaved: BIO_read() = returned nothing, but both BIO_eof() and BIO_should_retry() 6 returned zero. I tried to examine the source code of  crypto/bio/(bf_buff.c but it was too complicated to ? understand. Does anyone know why this happens? The version of  OpenSSL was 0.9.7l.   main = withOpenSSL $ . do mem <- newConstMem "Hello, world!" $ buf <- newBuffer Nothing  mem ==> buf  < bioRead buf >>= putStrLn -- This fails, but why? 5I am being depressed for this unaccountable failure. 77 creates a memory BIO sink/source. Any data written to D a memory BIO can be recalled by reading from it. Unless the memory A BIO is read only any data read from it is deleted from the BIO. Memory BIOs support /. Calling */ on a erad write memory BIO clears any data in B it. On a read only BIO it restores the BIO to its original state + and the read only data can be read again. +# is true if no data is in the BIO. BEvery read from a read write memory BIO will remove the data just C read with an internal copy operation, if a BIO contains a lots of ? data and it is read in small chunks the operation can be very E slow. The use of a read only memory BIO avoids this problem. If the 5 BIO must be read write then adding a buffering BIO (6) to & the chain will speed up the process. 88 str( creates a read-only memory BIO source. 99 bs is like 8 but takes a ByteString. :: lbs is like 8 but takes a  LazyByteString. ;; creates a null BIO sink/source. Data written to / the null sink is discarded, reads return EOF. @A null sink is useful if, for example, an application wishes to C digest some data by writing through a digest bio but not send the C digested data anywhere. Since a BIO chain must normally include a  source/;sink BIO this can be achieved by adding a null sink BIO to  the end of the chain. <$=>?%&'()*+,-./0123456789:;<$=>?%&'()*+,-./0123456789:;FReturn a bytestring consisting of the given number of strongly random  bytes DReturn a bytestring consisting of the given number of pseudo random  bytes  Add data to the entropy pool. It'$s safe to add sensitive information L (e.g. user passwords etc) to the pool. Also, adding data with an entropy  of 0 can never hurt. =Construct a new context which holds the key schedule and IV. HEncrypt some number of blocks using CBC. This is an IO function because ( the context is destructivly updated. DEncrypt some number of bytes using CTR mode. This is an IO function 0 because the context is destructivly updated.  Digest5 is an opaque object that represents an algorithm of  message digest.  name* returns a message digest algorithm whose  name is name,. If no algorithms are found, the result is  Nothing. * returns a list of name of message digest  algorithms. + digests a stream of data. The string must # not contain any letters which aren't in the range of U+0000 -  U+00FF.  digests a chunk of data.  digests a stream of data. HPerform a private key signing using the HMAC template with a given hash      CryptoMode represents instruction to & and such like. Cipher5 is an opaque object that represents an algorithm of  symmetric cipher. !! name& returns a symmetric cipher algorithm  whose name is name,. If no algorithms are found, the result is  Nothing. "", returns a list of name of symmetric cipher  algorithms. &&4 lazilly encrypts or decrypts a stream of data. The  input string doesn'!t necessarily have to be finite. ''0 strictly encrypts or decrypts a chunk of data. ((4 lazilly encrypts or decrypts a stream of data. The  input string doesn'!t necessarily have to be finite.  !"#$%&'()* !"#$%)*&'( !"#$%&'()*++ str% lazilly encodes a stream of data to  Base64. The string doesn'*t have to be finite. Note that the string ( must not contain any letters which aren't in the range of U+0000 -  U+00FF. ,, bs- strictly encodes a chunk of data to Base64. -- lbs% lazilly encodes a stream of data to  Base64. The string doesn't have to be finite. .. str' lazilly decodes a stream of data from  Base64. The string doesn't have to be finite. // bs' strictly decodes a chunk of data from  Base64. 00 lbs' lazilly decodes a stream of data from  Base64. The string doesn't have to be finite. +,-./0+,-./0+,-./0220 is an opaque object representing a big number. 33 f allocates a 2 and computes f . Then it  frees the 2. 6Convert a BIGNUM to an Integer 7EThis is a GHC specific, fast conversion between Integers and OpenSSL * bignums. It returns a malloced BigNum. 88 n f converts n to a 2 and computes f . Then it  frees the 2. 9This is an alias to 6. :This is an alias to 7. @FConvert a BigNum to an MPI: a serialisation of large ints which has a D 4-byte, big endian length followed by the bytes of the number in ! most-significant-first order. ADConvert an MPI into a BigNum. See bnToMPI for details of the format ;9Convert an Integer to an MPI. SEe bnToMPI for the format <9Convert an MPI to an Integer. SEe bnToMPI for the format == a p m computes a to the p-th power modulo m. >/Return a strongly random number in the range 0 <= x < n where the given ! filter function returns true. ?&Return a random number in the range 0 <= x < n where the given ! filter function returns true. @/Return a strongly random number in the range 0 <= x < n A/Return a strongly random number in the range 0 < x < n B&Return a random number in the range 0 <= x < n C&Return a random number in the range 0 < x < n 123456789:;<=>?@ABC2138:54976;<=>?@BAC123456789:;<=>?@ABC E4The type of a DSA key, includes parameters p, q, g. GIGenerate DSA parameters (*not* a key, but required for a key). This is a L compute intensive operation. See FIPS 186-2, app 2. This agrees with the * test vectors given in FIP 186-2, app 5 H/Generate a new DSA key, given valid parameters I+Return the public prime number of the key. J$Return the public 160-bit subprime, q | p-1 of the key. K4Return the public generator of subgroup of the key. LReturn the public key y = g^x. MReturn the private key x. NEConvert a DSA object to a tuple of its members in the order p, q, g, E public, private. If this is a public key, private will be Nothing OJConvert a tuple of members (in the same format as from dsaToTuple) into a  DSA object PKA utility function to generate both the parameters and the key pair at the E same time. Saves serialising and deserialising the parameters too QJSign pre-digested data. The DSA specs call for SHA1 to be used so, if you L use anything else, YMMV. Returns a pair of Integers which, together, are  the signature R,Verify pre-digested data given a signature. DEFGHIJKLMNOPQREDFGHPQRIJKMLNODEFGHIJKLMNOPQR SS' represents a callback function to get . informed the progress of RSA key generation.   callback 0 i is called after generating the i-th potential  prime number. 1 While the number is being tested for primality,  callback 1 j is  called after the j-th iteration (j = 0, 1, ...).  When the n0-th randomly generated prime is rejected as not  suitable for the key,  callback 2 n is called.  When a random p has been found with p-1 relatively prime to  e, it is called as  callback 3 0. ( The process is then repeated for prime q with  callback 3 1. UU; is an opaque object that represents either RSA public key  or public/private keypair. WW generates an RSA keypair. XX pubKey( returns the public modulus of the key. YY pubKey) returns the public exponent of the key. ZZ privKey- returns the private exponent of the key. If  privKey, is not really a private key, the result is Nothing. [[ privkey! returns the secret prime factor p of the key. \\ privkey! returns the secret prime factor q of the key. ]] privkey returns  d mod (p-1) of the key. ^^ privkey returns  d mod (q-1) of the key. __ privkey returns  q^-1 mod p of the key. STUVWXYZ[\]^_ UTVSWXYZ[\]^_ STUVWXYZ[\]^_ aPKey: is an opaque object that represents either public key or  public/6private keypair. The concrete algorithm of asymmetric ! cipher is hidden in the object. hh  rsa encapsulates an RSA key into a . ii  dsa encapsulates an E key into a . `abcdefghi a`bcdefghi `abcdefghi jj 5 lazilly decrypts a stream of data. The input string  doesn'!t necessarily have to be finite. kk  decrypts a chunk of data. ll 5 lazilly decrypts a stream of data. The input string  doesn'!t necessarily have to be finite. jkljkljkl mm 5 lazilly encrypts a stream of data. The input string  doesn'!t necessarily have to be finite. nn $ strictly encrypts a chunk of data. oo 5 lazilly encrypts a stream of data. The input string  doesn'!t necessarily have to be finite. mnomnomno pp 9 generates a signature from a stream of data. The string ( must not contain any letters which aren't in the range of U+0000 -  U+00FF. qq - generates a signature from a chunk of data. rr . generates a signature from a stream of data. pqrpqrpqr ss & represents a result of verification. vv 7 verifies a signature and a stream of data. The string ( must not contain any letters which aren't in the range of U+0000 -  U+00FF. ww + verifies a signature and a chunk of data. xx + verifies a signature of a stream of data. stuvwxsutvwxsuttuvwx BCDEFGHIJKLM BCDEFGHIJKLMNOPQNOPQzz8 is an opaque object that represents X.509 certificate. {{0 creates an empty certificate. You must set the * following properties to and sign it (see ) to actually  use the certificate. Version See .  Serial number See .  Issuer name See .  Subject name See . Validity See  and .  Public Key See .  cert1 cert2 compares two certificates. 1 signs a certificate with an issuer private key. 4 verifies a signature of certificate with an issuer  public key.  cert. translates a certificate into human-readable  format.  cert/ returns the version number of certificate. It 9 seems the number is 0-origin: version 2 means X.509 v3.  cert ver, updates the version number of certificate.  cert+ returns the serial number of certificate.  cert num updates the serial number of  certificate. ) returns the issuer name of certificate.  cert name updates the issuer name of E certificate. Keys of each parts may be of either long form or short  form. See .  cert wantLongName returns the subject name of  certificate. See .  cert name updates the subject name of  certificate. See .  cert. returns the time when the certificate begins  to be valid.  cert utc' updates the time when the certificate  begins to be valid.  cert' returns the time when the certificate  expires.  cert utc' updates the time when the certificate  expires.  cert* returns the public key of the subject of  certificate.  cert pubkey' updates the public key of the subject  of certificate.  cert* returns every subject email addresses in  the certificate. yz{|}~zy{|}~yz{|}~only send our shutdown #wait for the peer to also shutdown RIThis is the type of an SSL IO operation. EOF and termination are handled J by exceptions while everything else is one of these. Note that reading > from an SSL socket can result in WantWrite and vice versa. S!needs more outgoing buffer space T!needs more data from the network U successfully mananged *n* bytes &This is the type of an SSL connection GSSL objects are not thread safe, so they carry a QSem around with them N which only lets a single thread work inside them at a time. Thus, one must < always use withSSL, rather than withForeignPtr directly. JIO with SSL objects is non-blocking and many SSL functions return a error L code which signifies that it needs to read or write more data. We handle J these calls and call threadWaitRead and threadWaitWrite at the correct * times. Thus multiple OS threads can be blocked inside IO in the same SSL & object at a time, because they aren'%t really in the SSL object, they are 3 waiting for the RTS to wake the Haskell thread. See  7http://www.openssl.org/docs/ssl/SSL_CTX_set_verify.html is a certificate required !only request once per connection =An SSL context. Contexts carry configuration such as a server' s private I key, root CA certiifcates etc. Contexts are stateful IO objects; they L start empty and various options are set on them by the functions in this N module. Note that an empty context will pretty much cause any operation to  fail since it doesn'!t even have any ciphers enabled. GContexts are not thread safe so they carry a QSem with them which only N lets a single thread work inside them at a time. Thus, one must always use - withContext, not withForeignPtr directly. Create a new SSL context. VFRun the given action with the raw context pointer and obtain the lock  while doing so. KInstall a private key file in a context. The key is given as a path to the M file which contains the key. The file is parsed first as PEM and, if that 9 fails, as ASN1. If both fail, an exception is raised. JInstall a certificate (public key) file in a context. The key is given as N a path to the file which contains the key. The file is parsed first as PEM F and, if that fails, as ASN1. If both fail, an exception is raised. JSet the ciphers to be used by the given context. The string argument is a 1 list of ciphers, comma separated, as given at  http:www.openssl.orgdocsapps/ ciphers.html BUnrecognised ciphers are ignored. If no ciphers from the list are ' recognised, an exception is raised. KReturn true iff the private key installed in the given context matches the  certificate also installed. JSet the location of a PEM encoded list of CA certificates to be used when  verifying a server's certificate CSet the path to a directory which contains the PEM encoded CA root + certificates. This is an alternative to . See   Bhttp://www.openssl.org/docs/ssl/SSL_CTX_load_verify_locations.html for % details of the file naming scheme FWrap a Socket in an SSL connection. Reading and writing to the Socket F after this will cause weird errors in the SSL code. The SSL object J carries a handle to the Socket so you need not worry about the garbage = collector closing the file descriptor out from under you. WIPerform an SSL operation which can return non-blocking error codes, thus K requesting that the operation be performed when data or buffer space is  availible.  Perform an SSL server handshake  Perform an SSL client handshake XCPerform an SSL operation which operates of a buffer and can return M non-blocking error codes, thus requesting that it be performed again when + more data or buffer space is availible. JNote that these SSL functions generally require that the arguments to the N repeated call be exactly the same. This presents an issue because multiple N threads could try writing at the same time (with different buffers) so the M calling function should probably hold the lock on the SSL object over the ' whole time (include repeated calls) ITry the read the given number of bytes from an SSL connection. On EOF an K empty ByteString is returned. If the connection dies without a graceful ) SSL shutdown, an exception is raised. GWrite a given ByteString to the SSL connection. Either all the data is 9 written or an exception is raised because of an error ECleanly shutdown an SSL connection. Note that SSL has a concept of a L secure shutdown, which is distinct from just closing the TCP connection. < This performs the former and should always be preferred. GThis can either just send a shutdown, or can send and wait for the peer's  shutdown message. JAfter a successful connection, get the certificate of the other party. If 0 this is a server connection, you probably won't get a certificate unless 4 you asked for it with contextSetVerificationMode #Get the result of verifing the peer'"s certificate. This is mostly for L clients to verify the certificate of the server that they have connected L it. You must set a list of root CA certificates with contextSetCA... for  this to make sense. (Note that this returns True iff the peer' s certificate has a valid chain N to a root CA. You also need to check that the certificate is correct (i.e. < has the correct hostname in it) with getPeerCertificate. ,Get the socket underlying an SSL connection ' represents a revoked certificate in a ? list. Each certificates are supposed to be distinguishable by A issuer name and serial number, so it is sufficient to have only  serial number on each entries. < is an opaque object that represents Certificate Revocation  List. 4 creates an empty revocation list. You must set the * following properties to and sign it (see ) to actually use E the revocation list. If you have any certificates to be listed, you  must of course add them (see ) before signing the list. Version See .  Last Update See .  Next Update See .  Issuer Name See . 5 signs a revocation list with an issuer private key. 1 verifies a signature of revocation list with an  issuer public key. 2 translates a revocation list into human-readable  format.  crl0 returns the version number of revocation list.  crl ver* updates the version number of revocation  list.  crl+ returns the time when the revocation list  has last been updated.  crl utc& updates the time when the revocation  list has last been updated.  crl+ returns the time when the revocation list  will next be updated.  crl utc& updates the time when the revocation  list will next be updated.  crl wantLongName returns the issuer name of  revocation list. See OpenSSL.X509.getIssuerName of   OpenSSL.X509.  crl name' updates the issuer name of revocation  list. See OpenSSL.X509.setIssuerName of  OpenSSL.X509.  crl+ returns the list of revoked certificates.  crl revoked' add the certificate to the revocation  list.  crl0 sorts the certificates in the revocation list. + is an opaque object that represents X.509 D certificate store. The certificate store is usually used for chain  verification. + creates an empty X.509 certificate store.  store cert adds a certificate to store.  store crl" adds a revocation list to store.   represents a result of PKCS#7  verification. See . Nothing if the PKCS#7  signature was a detached  signature, and  Just content  if it wasn't. 4 is a set of flags that are used in many operations  related to PKCS#7.  represents an abstract PKCS#7 structure. The concrete A type of structure is hidden in the object: such polymorphism isn't E very haskellish but please get it out of your mind since OpenSSL is  written in C.  creates a PKCS#7 signedData structure.  verifies a PKCS#7 signedData structure.  creates a PKCS#7 envelopedData structure.  decrypts content from PKCS#7 envelopedData  structure.  writes PKCS#7 structure to S/MIME message.  parses S/MIME message.   ) is an opaque object that represents PKCS#10  certificate request. 4 creates an empty certificate request. You must set . the following properties to and sign it (see ) to ' actually use the certificate request. Version See .  Subject Name See .  Public Key See . 4 signs a certificate request with a subject private  key. 2 verifies a signature of certificate request with  a subject public key.  req' translates a certificate request into  human-readable format.  req+ returns the version number of certificate  request.  req ver+ updates the version number of certificate  request.  req wantLongName returns the subject name of  certificate request. See OpenSSL.X509.getSubjectName of   OpenSSL.X509.  req name updates the subject name of  certificate request. See OpenSSL.X509.setSubjectName of   OpenSSL.X509.  req* returns the public key of the subject of  certificate request.  req* updates the public key of the subject of  certificate request.  req cert$ creates an empty X.509 certificate E and copies as much data from the request as possible. The resulting  certificate doesn'$t have the following data and it isn' t signed so * you must fill them and sign it yourself.  Serial number % Validity (Not Before and Not After)  Example:  import Data.Time.Clock  D genCert :: X509 -> EvpPKey -> Integer -> Int -> X509Req -> IO X509 & genCert caCert caKey serial days req - = do cert <- makeX509FromReq req caCert ! now <- getCurrentTime & setSerialNumber cert serial 2 setNotBefore cert $ addUTCTime (-1) now C setNotAfter cert $ addUTCTime (days * 24 * 60 * 60) now & signX509 cert caKey Nothing  return cert  represents format of PKCS#10 certificate  request.  The old format, whose header is " CERTIFICATE  REQUEST".  The new format, whose header is "NEW  CERTIFICATE REQUEST". & represents a way to supply password. ,FIXME: using PwTTY causes an error but I don' t know why:  ":error:0906406D:PEM routines:DEF_CALLBACK:problems getting  password" read a password from TTY get a  password  by a  callback password in a static string  no password  represents a context of  . The callback was called to get  a password to encrypt  something. The callback was called to get  a password to read something  encrypted. , represents a callback function to supply a  password. Int4 The maximum length of the password to be accepted. PemPasswordRWState The context.  IO String The resulting password. ' writes a private key to PEM string in  PKCS# 8 format.  pem supply$ reads a private key in PEM string.  pubkey writes a public to PEM string.  pem# reads a public key in PEM string.  cert, writes an X.509 certificate to PEM string.  pem+ reads an X.509 certificate in PEM string.  writes a PKCS#10 certificate request to PEM  string.    reads a PKCS#&10 certificate request in PEM string.    crl- writes a Certificate Revocation List to PEM  string.    pem4 reads a Certificate Revocation List in PEM string.    p7 writes a PKCS#7 structure to PEM string.    pem reads a PKCS#7 structure in PEM string.                Computation of  action initializes the OpenSSL  library and computes action. Every applications that use < HsOpenSSL must wrap any operations related to OpenSSL with  , or they might crash.  module Main where  import OpenSSL   main :: IO ()  main = withOpenSSL $  do ... Y !"#$%&'()*+,-./01234567"#89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrdstuvwxyz { | } ~           !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi HsOpenSSL-0.5OpenSSL.RandomOpenSSL.CipherOpenSSL.EVP.DigestOpenSSL.EVP.CipherOpenSSL.EVP.Base64 OpenSSL.BN OpenSSL.DSA OpenSSL.RSAOpenSSL.EVP.PKeyOpenSSL.EVP.OpenOpenSSL.EVP.SealOpenSSL.EVP.SignOpenSSL.EVP.Verify OpenSSL.X509OpenSSL.SessionOpenSSL.X509.RevocationOpenSSL.X509.Store OpenSSL.PKCS7OpenSSL.X509.Request OpenSSL.PEMOpenSSL OpenSSL.Stack OpenSSL.SSLOpenSSL.Objects OpenSSL.ERR OpenSSL.Utils OpenSSL.BIO OpenSSL.ASN1OpenSSL.X509.Name randBytes prandBytesaddModeDecryptEncrypt newAESCtxaesCBCaesCTR EVP_MD_CTX DigestCtxEVP_MDDigest withMDPtrgetDigestByNamegetDigestNameswithDigestCtxPtrdigestStrictly digestLazilydigestdigestBS digestBS' digestLBShmacBSpkcs5_pbkdf2_hmac_sha1 CryptoModeEVP_CIPHER_CTX CipherCtx EVP_CIPHERCipher withCipherPtrgetCipherByNamegetCipherNamescipherIvLengthnewCtxwithCipherCtxPtrciphercipherBS cipherLBScipherStrictly cipherLazily encodeBase64encodeBase64BSencodeBase64LBS decodeBase64decodeBase64BSdecodeBase64LBSBIGNUMBigNumallocaBNunwrapBNwrapBN bnToInteger integerToBNwithBNpeekBNnewBN integerToMPI mpiToIntegermodexp randIntegerUptoNMinusOneSuchThat!prandIntegerUptoNMinusOneSuchThatrandIntegerZeroToNMinusOnerandIntegerOneToNMinusOneprandIntegerZeroToNMinusOneprandIntegerOneToNMinusOneDSA_DSA withDSAPtrgenerateParameters generateKeydsaPdsaQdsaG dsaPublic dsaPrivate dsaToTuple tupleToDSAgenerateParametersAndKeysignDigestedDataverifyDigestedDataRSAGenKeyCallbackRSA_RSA withRSAPtrrsaNrsaErsaDrsaPrsaQrsaDMP1rsaDMQ1rsaIQMPEVP_PKEYPKey wrapPKeyPtr withPKeyPtrunsafePKeyToPtr touchPKeypkeySize pkeyDefaultMD newPKeyRSA newPKeyDSAopenopenBSopenLBSsealsealBSsealLBSsignsignBSsignLBS VerifyStatus VerifyFailure VerifySuccessverifyverifyBS verifyLBSX509_X509newX509wrapX509 withX509Ptr withX509StackunsafeX509ToPtr touchX509 compareX509signX509 verifyX509 printX509 getVersion setVersiongetSerialNumbersetSerialNumber getIssuerName setIssuerNamegetSubjectNamesetSubjectName getNotBefore setNotBefore getNotAfter setNotAfter getPublicKey setPublicKeygetSubjectEmail ShutdownTypeUnidirectional BidirectionalSSLVerificationMode VerifyPeervpFailIfNoPeerCert vpClientOnce VerifyNone SSLContextcontextcontextSetPrivateKeyFilecontextSetCertificateFilecontextSetCipherscontextSetDefaultCipherscontextCheckPrivateKeycontextSetVerificationModecontextSetCAFilecontextSetCADirectory connectionacceptconnectreadwriteshutdowngetPeerCertificategetVerifyResult sslSocketRevokedCertificaterevSerialNumberrevRevocationDateX509_CRLCRLnewCRLwrapCRL withCRLPtrsignCRL verifyCRLprintCRL getLastUpdate setLastUpdate getNextUpdate setNextUpdategetRevokedList addRevokedsortCRL X509_STORE X509Store newX509StorewithX509StorePtraddCertToStore addCRLToStorePkcs7VerifyStatusPkcs7VerifyFailurePkcs7VerifySuccess Pkcs7Flag Pkcs7CRLFEOLPkcs7NoOldMimeTypePkcs7NoSmimeCap Pkcs7NoAttr Pkcs7Binary Pkcs7Detached Pkcs7NoVerify Pkcs7NoIntern Pkcs7NoChain Pkcs7NoSigs Pkcs7NoCerts Pkcs7TextPKCS7Pkcs7 wrapPkcs7Ptr withPkcs7Ptr pkcs7Sign pkcs7Verify pkcs7Encrypt pkcs7Decrypt writeSmime readSmimeX509_REQX509Req newX509Req wrapX509ReqwithX509ReqPtr signX509Req verifyX509Req printX509ReqmakeX509FromReqPemX509ReqFormat ReqOldFormat ReqNewFormatPemPasswordSupplyPwTTY PwCallbackPwStrPwNonePemPasswordRWStatePwWritePwReadPemPasswordCallbackwritePKCS8PrivateKeyreadPrivateKeywritePublicKey readPublicKey writeX509readX509 writeX509Req readX509ReqwriteCRLreadCRL writePkcs7 readPkcs7 withOpenSSLSTACKmapStack withStackwithForeignStack libraryInitaddAllAlgorithmsloadErrorStrings ObjNameTypeCompMethodTypePKeyMethodTypeCipherMethodType MDMethodType getObjNamesgetError peekError errorStringtoHexfromHex failIfNullfailIfraiseOpenSSLErrorBIObioPush==><==bioJoinbioFlushbioResetbioEOFbioRead bioReadBS bioReadLBSbioGets bioGetsBS bioGetsLBSbioWrite bioWriteBS bioWriteLBS newBase64 newBuffernewMem newConstMem newConstMemBSnewConstMemLBS newNullBIOBIO_ wrapBioPtr withBioPtr withBioPtr'bnToMPImpiToBNobj2nid ASN1_TIME ASN1_INTEGER ASN1_STRING ASN1_OBJECTnid2snnid2lnpeekASN1StringpeekASN1IntegerwithASN1Integer peekASN1Time withASN1Time X509_NAMEallocaX509Name withX509Name peekX509Name SSLIOResult WantWriteWantReadDone withContextsslDoHandshake sslIOInner