summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/pem/pem_lib.c
diff options
context:
space:
mode:
authorbeck <>2014-04-15 17:46:17 +0000
committerbeck <>2014-04-15 17:46:17 +0000
commitc9414ed70ec89926c1041a64ee4b2f3ef36c90f6 (patch)
treec53c25a15cd89988cef641fa18324c5c6db28fed /src/lib/libcrypto/pem/pem_lib.c
parent0cfe49dc6db41fd2d4f960b618ed41b11ffffc6a (diff)
downloadopenbsd-c9414ed70ec89926c1041a64ee4b2f3ef36c90f6.tar.gz
openbsd-c9414ed70ec89926c1041a64ee4b2f3ef36c90f6.tar.bz2
openbsd-c9414ed70ec89926c1041a64ee4b2f3ef36c90f6.zip
Send the rotIBM stream cipher (ebcdic) to Valhalla to party for eternity
with the bearded ones... some API's that nobody should be using will dissapear with this commit.
Diffstat (limited to 'src/lib/libcrypto/pem/pem_lib.c')
-rw-r--r--src/lib/libcrypto/pem/pem_lib.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/lib/libcrypto/pem/pem_lib.c b/src/lib/libcrypto/pem/pem_lib.c
index 5a421fc4b6..74baa2ec1c 100644
--- a/src/lib/libcrypto/pem/pem_lib.c
+++ b/src/lib/libcrypto/pem/pem_lib.c
@@ -382,10 +382,6 @@ int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp,
382 PEMerr(PEM_F_PEM_ASN1_WRITE_BIO,PEM_R_READ_KEY); 382 PEMerr(PEM_F_PEM_ASN1_WRITE_BIO,PEM_R_READ_KEY);
383 goto err; 383 goto err;
384 } 384 }
385#ifdef CHARSET_EBCDIC
386 /* Convert the pass phrase from EBCDIC */
387 ebcdic2ascii(buf, buf, klen);
388#endif
389 kstr=(unsigned char *)buf; 385 kstr=(unsigned char *)buf;
390 } 386 }
391 RAND_add(data,i,0);/* put in the RSA key. */ 387 RAND_add(data,i,0);/* put in the RSA key. */
@@ -458,11 +454,6 @@ int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *plen,
458 PEMerr(PEM_F_PEM_DO_HEADER,PEM_R_BAD_PASSWORD_READ); 454 PEMerr(PEM_F_PEM_DO_HEADER,PEM_R_BAD_PASSWORD_READ);
459 return(0); 455 return(0);
460 } 456 }
461#ifdef CHARSET_EBCDIC
462 /* Convert the pass phrase from EBCDIC */
463 ebcdic2ascii(buf, buf, klen);
464#endif
465
466 if (!EVP_BytesToKey(cipher->cipher,EVP_md5(),&(cipher->iv[0]), 457 if (!EVP_BytesToKey(cipher->cipher,EVP_md5(),&(cipher->iv[0]),
467 (unsigned char *)buf,klen,1,key,NULL)) 458 (unsigned char *)buf,klen,1,key,NULL))
468 return 0; 459 return 0;
@@ -516,15 +507,9 @@ int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher)
516 for (;;) 507 for (;;)
517 { 508 {
518 c= *header; 509 c= *header;
519#ifndef CHARSET_EBCDIC
520 if (!( ((c >= 'A') && (c <= 'Z')) || (c == '-') || 510 if (!( ((c >= 'A') && (c <= 'Z')) || (c == '-') ||
521 ((c >= '0') && (c <= '9')))) 511 ((c >= '0') && (c <= '9'))))
522 break; 512 break;
523#else
524 if (!( isupper(c) || (c == '-') ||
525 isdigit(c)))
526 break;
527#endif
528 header++; 513 header++;
529 } 514 }
530 *header='\0'; 515 *header='\0';