• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/openssl/crypto/engine/

Lines Matching defs:char

84 static int cca_rsa_pub_enc(int flen, const unsigned char *from,
85 unsigned char *to, RSA *rsa,int padding);
86 static int cca_rsa_priv_dec(int flen, const unsigned char *from,
87 unsigned char *to, RSA *rsa,int padding);
88 static int cca_rsa_sign(int type, const unsigned char *m, unsigned int m_len,
89 unsigned char *sigret, unsigned int *siglen, const RSA *rsa);
90 static int cca_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len,
91 unsigned char *sigbuf, unsigned int siglen, const RSA *rsa);
95 static EVP_PKEY *ibm_4758_load_privkey(ENGINE*, const char*,
97 static EVP_PKEY *ibm_4758_load_pubkey(ENGINE*, const char*,
100 static int getModulusAndExponent(const unsigned char *token, long *exponentLength,
101 unsigned char *exponent, long *modulusLength,
102 long *modulusFieldLength, unsigned char *modulus);
107 static int cca_get_random_bytes(unsigned char*, int );
127 static const char *CCA4758_LIB_NAME = NULL;
128 static const char *get_CCA4758_LIB_NAME(void)
140 static long set_CCA4758_LIB_NAME(const char *name)
146 static const char* n_keyRecordRead = CSNDKRR;
147 static const char* n_digitalSignatureGenerate = CSNDDSG;
148 static const char* n_digitalSignatureVerify = CSNDDSV;
149 static const char* n_publicKeyExtract = CSNDPKX;
150 static const char* n_pkaEncrypt = CSNDPKE;
151 static const char* n_pkaDecrypt = CSNDPKD;
153 static const char* n_randomNumberGenerate = CSNBRNG;
200 static const char *engine_4758_cca_id = "4758cca";
201 static const char *engine_4758_cca_name = "IBM 4758 CCA hardware engine support";
363 return set_CCA4758_LIB_NAME((const char *)p);
376 static EVP_PKEY *ibm_4758_load_privkey(ENGINE* e, const char* key_id,
381 unsigned char* keyToken = NULL;
382 unsigned char pubKeyToken[MAX_CCA_PKA_TOKEN_SIZE];
389 unsigned char exitData[8];
390 unsigned char ruleArray[8];
391 unsigned char keyLabel[64];
393 unsigned char modulus[256];
396 unsigned char exponent[256];
450 RSA_set_ex_data(rtmp, hndidx, (char *)keyToken);
470 static EVP_PKEY *ibm_4758_load_pubkey(ENGINE* e, const char* key_id,
475 unsigned char* keyToken = NULL;
481 unsigned char exitData[8];
482 unsigned char ruleArray[8];
483 unsigned char keyLabel[64];
485 unsigned char modulus[512];
488 unsigned char exponent[512];
530 RSA_set_ex_data(rtmp, hndidx, (char *)keyToken);
548 static int cca_rsa_pub_enc(int flen, const unsigned char *from,
549 unsigned char *to, RSA *rsa,int padding)
555 unsigned char exitData[8];
557 unsigned char ruleArray[8] = "PKCS-1.2";
559 unsigned char dataStructure[8];
562 unsigned char* keyToken = (unsigned char*)RSA_get_ex_data(rsa, hndidx);
568 &ruleArrayLength, ruleArray, &lflen, (unsigned char*)from,
577 static int cca_rsa_priv_dec(int flen, const unsigned char *from,
578 unsigned char *to, RSA *rsa,int padding)
584 unsigned char exitData[8];
586 unsigned char ruleArray[8] = "PKCS-1.2";
588 unsigned char dataStructure[8];
591 unsigned char* keyToken = (unsigned char*)RSA_get_ex_data(rsa, hndidx);
597 &ruleArrayLength, ruleArray, &lflen, (unsigned char*)from,
606 static int cca_rsa_verify(int type, const unsigned char *m, unsigned int m_len,
607 unsigned char *sigbuf, unsigned int siglen, const RSA *rsa)
613 unsigned char exitData[8];
615 unsigned char ruleArray[8] = "PKCS-1.1";
617 unsigned char* keyToken = (unsigned char*)RSA_get_ex_data(rsa, hndidx);
620 unsigned char *hashBuffer = NULL;
653 sig.digest->data = (unsigned char*)m;
678 hashBuffer = (unsigned char *)m;
683 unsigned char *ptr;
698 unsigned char *ptr;
729 static int cca_rsa_sign(int type, const unsigned char *m, unsigned int m_len,
730 unsigned char *sigret, unsigned int *siglen, const RSA *rsa)
735 unsigned char exitData[8];
737 unsigned char ruleArray[8] = "PKCS-1.1";
741 unsigned char *hashBuffer = NULL;
742 unsigned char* keyToken = (unsigned char*)RSA_get_ex_data(rsa, hndidx);
777 sig.digest->data = (unsigned char*)m;
801 hashBuffer = (unsigned char*)m;
806 unsigned char *ptr;
820 unsigned char *ptr;
852 static int getModulusAndExponent(const unsigned char*token, long *exponentLength,
853 unsigned char *exponent, long *modulusLength, long *modulusFieldLength,
854 unsigned char *modulus)
858 if (*token++ != (char)0x1E) /* internal PKA token? */
866 len |= (unsigned char)*token++;
870 if (*token++ == (char)0x04)
877 len |= (unsigned char)*token++;
883 len |= (unsigned char)*token++;
889 len |= (unsigned char)*token++;
895 len |= (unsigned char)*token++;
915 static int cca_get_random_bytes(unsigned char* buf, int num)
920 unsigned char exit_data[4];
921 unsigned char form[] = "RANDOM ";
922 unsigned char rand_buf[8];
956 static int bind_fn(ENGINE *e, const char *id)